Files
pikachu/.github/workflows/deploy.yml
T
tiennm99 214c305e83 ci: add GitHub Actions workflow to deploy to GitHub Pages
- Add deploy.yml: test → build → deploy pipeline
- Update next.config.mjs with basePath/assetPrefix for /pikachu/ subpath
- Uses actions/deploy-pages for GitHub Pages deployment
2026-04-04 14:42:00 +07:00

49 lines
965 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:
test:
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 test
build-deploy:
needs: test
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run build-nolog
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with:
path: dist
- id: deployment
uses: actions/deploy-pages@v4