name: Deploy to GitHub Pages on: workflow_run: workflows: ["CI"] types: - completed branches: - main jobs: deploy: runs-on: ubuntu-latest # Only run if the CI workflow succeeded if: ${{ github.event.workflow_run.conclusion == 'success' }} permissions: contents: read pages: write id-token: write steps: - name: Checkout repository uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: "20" - name: Install dependencies run: npm ci - name: Build production files (includes type check) run: npm run build - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: path: ./dist - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4