name: Pages on: push: branches: [main] paths: - site/** - .github/workflows/pages.yml # A new release changes the version and download links on the page. workflow_run: workflows: [Release] types: [completed] workflow_dispatch: permissions: contents: read concurrency: group: pages cancel-in-progress: false jobs: build: # The Release workflow also runs on pull requests. Only a tag publishes anything. if: >- github.event_name != 'workflow_run' || (github.event.workflow_run.event == 'push' && github.event.workflow_run.conclusion == 'success') runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - name: stamp the latest release into the page env: GH_TOKEN: ${{ github.token }} run: | tag=$(gh release view --json tagName --jq .tagName) sed -i "s/0\.2\.0/${tag#v}/g" site/index.html site/app.js - name: leave out what only builds the page run: rm site/render-media.sh site/render-icons.sh site/render-icons.mjs site/media/tour.json - uses: actions/upload-pages-artifact@v5 with: path: site deploy: needs: build runs-on: ubuntu-latest permissions: pages: write id-token: write environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} steps: - id: deployment uses: actions/deploy-pages@v5