Files
loldle/web/.github/workflows/deploy.yml
T
tiennm99 a130dd191b fix: make basePath configurable via NEXT_PUBLIC_BASE_PATH env var
Enables platform-agnostic deployment — GitHub Pages sets the env var
in CI, while Vercel/Netlify/local dev default to root path.
2026-04-04 12:24:39 +07:00

47 lines
799 B
YAML

name: Deploy to GitHub Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run build
env:
NEXT_PUBLIC_BASE_PATH: /loldle
- uses: actions/upload-pages-artifact@v3
with:
path: out
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4