Skip to content

refactor(config): Update env example and package scripts #12

refactor(config): Update env example and package scripts

refactor(config): Update env example and package scripts #12

name: Deploy Frontend → GitHub Pages
on:
push:
branches: [main]
paths:
- "frontend/**"
- ".github/workflows/deploy-frontend.yml"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
working-directory: frontend
run: npm ci
- name: Build static export
working-directory: frontend
env:
NEXT_PUBLIC_API_URL: ${{ secrets.API_URL }}
run: npm run build
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: frontend/out
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4