master
 1name: Pages
 2
 3on:
 4  workflow_dispatch:
 5  workflow_run:
 6    workflows: [Test]
 7    types: [completed]
 8
 9permissions:
10  contents: read
11  pages: write
12  id-token: write
13
14concurrency:
15  group: 'pages'
16  cancel-in-progress: false
17
18jobs:
19  deploy:
20    environment:
21      name: github-pages
22      url: ${{ steps.deployment.outputs.page_url }}
23    runs-on: ubuntu-latest
24    if: ${{ github.event.workflow_run.conclusion == 'success' }}
25
26    steps:
27      - name: Setup Node.js 22.x
28        uses: actions/setup-node@v4
29        with:
30          node-version: 22.x
31      - name: Checkout
32        uses: actions/checkout@v4
33      - name: Install dependencies
34        run: npm ci
35      - name: Build
36        run: npm run build
37      - name: Setup Pages
38        uses: actions/configure-pages@v5
39      - name: Generate index.html
40        run: npm run generate-gh-pages
41      - name: Find & copy badges
42        run: find ./badges -type f -name "*.png" -exec cp {} .pages \;
43      - name: Upload artifact
44        uses: actions/upload-pages-artifact@v3
45        with:
46          path: '.pages'
47      - name: Deploy to GitHub Pages
48        id: deployment
49        uses: actions/deploy-pages@v4