| 1 | name: Deploy site |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: [main-v2] |
| 6 | paths: ['site/**', 'release-notes/**', '.github/workflows/pages.yml'] |
| 7 | workflow_dispatch: |
| 8 | |
| 9 | permissions: |
| 10 | contents: read |
| 11 | pages: write |
| 12 | id-token: write |
| 13 | |
| 14 | concurrency: |
| 15 | group: pages |
| 16 | cancel-in-progress: false |
| 17 | |
| 18 | jobs: |
| 19 | build: |
| 20 | runs-on: ubuntu-latest |
| 21 | steps: |
| 22 | - uses: actions/checkout@v7 |
| 23 | - uses: actions/setup-node@v7 |
| 24 | with: |
| 25 | node-version: '22' |
| 26 | cache: npm |
| 27 | cache-dependency-path: site/package-lock.json |
| 28 | - name: Build |
| 29 | working-directory: site |
| 30 | env: |
| 31 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 32 | run: | |
| 33 | npm ci |
| 34 | npm run build |
| 35 | - uses: actions/upload-pages-artifact@v5 |
| 36 | with: |
| 37 | path: site/dist |
| 38 | |
| 39 | deploy: |
| 40 | needs: build |
| 41 | runs-on: ubuntu-latest |
| 42 | environment: |
| 43 | name: github-pages |
| 44 | url: ${{ steps.deploy.outputs.page_url }} |
| 45 | steps: |
| 46 | - id: deploy |
| 47 | uses: actions/deploy-pages@v5 |
| 48 |