From a51da74cbb6b3d092a1ac3cf996dc0516f4ae813 Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Fri, 19 Jun 2026 18:23:16 +0200 Subject: [PATCH] chore(ci): add GitHub Pages build and deploy workflow --- .github/workflows/deploy-pages.yml | 57 ++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/deploy-pages.yml diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml new file mode 100644 index 0000000..00728bf --- /dev/null +++ b/.github/workflows/deploy-pages.yml @@ -0,0 +1,57 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: [main] + workflow_dispatch: + +# Allow the deploy job to publish to Pages via OIDC. +permissions: + contents: read + pages: write + id-token: write + +# Only one Pages deployment at a time; cancel superseded runs. +concurrency: + group: pages + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + with: + version: 10 + + - uses: actions/setup-node@v4 + with: + node-version: 24 + cache: pnpm + + - run: pnpm install --frozen-lockfile + + # Served from a custom domain at the root, so no --base override. + - run: pnpm build + + # SPA fallback: vue-router runs in history mode, so unmatched paths + # (deep links, refreshes) must fall through to the app instead of 404. + - run: cp dist/index.html dist/404.html + + - uses: actions/configure-pages@v5 + + - uses: actions/upload-pages-artifact@v3 + with: + path: dist + + 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