publish-version-metadata.yml

 1name: Publish Version Metadata
 2
 3on:
 4  workflow_run:
 5    workflows: ["Release"]
 6    types:
 7      - completed
 8  workflow_dispatch:
 9
10permissions:
11  contents: read
12  pages: write
13  id-token: write
14
15concurrency:
16  group: "pages"
17  cancel-in-progress: true
18
19jobs:
20  build:
21    runs-on: ubuntu-latest
22    if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
23    steps:
24      - name: Checkout
25        uses: actions/checkout@v4
26        with:
27          fetch-depth: 0
28
29      - name: Generate version metadata
30        run: python3 scripts/generate-version-metadata.py _site
31
32      - name: Upload artifact
33        uses: actions/upload-pages-artifact@v3
34        with:
35          path: _site
36
37  deploy:
38    environment:
39      name: github-pages
40      url: ${{ steps.deployment.outputs.page_url }}
41    runs-on: ubuntu-latest
42    needs: build
43    steps:
44      - name: Deploy to GitHub Pages
45        id: deployment
46        uses: actions/deploy-pages@v4