From 45d2f42d8be9f9028a57bee9ac003e0aebd33af8 Mon Sep 17 00:00:00 2001 From: FilipNone <165696124+FilipNone@users.noreply.github.com> Date: Thu, 26 Nov 2026 13:56:12 +0100 Subject: [PATCH 1/2] Revert "ci(pages): give every deploy its own build version (#18)" This reverts commit 371769c54d42c1ae464080c6104de80e38fc5b73. --- .github/workflows/pages.yml | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index cf5cf10..a9f9712 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -5,11 +5,6 @@ name: Pages # Publishing a release redeploys the site if the github-pages environment # allows v* tags. Enable Pages with "GitHub Actions" as the source in the # repository settings. -# -# Pages keeps the first deployment of each build version, and -# actions/deploy-pages always uses the commit as the version. A release -# published on the commit main was last deployed from then changed nothing -# (0.6.0 did that), so the deploy step below gives every run its own version. on: push: @@ -63,14 +58,10 @@ jobs: run: npm run build:site - name: Upload site - id: upload uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 with: path: web/dist - outputs: - artifact_id: ${{ steps.upload.outputs.artifact_id }} - deploy: name: Deploy needs: build @@ -84,28 +75,6 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} steps: - # The same API calls as actions/deploy-pages, with a build version of - # its own for each run. - name: Deploy to GitHub Pages id: deployment - env: - GH_TOKEN: ${{ github.token }} - ARTIFACT_ID: ${{ needs.build.outputs.artifact_id }} - BUILD_VERSION: ${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }} - run: | - oidc=$(curl -sSf -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL" | jq -r .value) - status_url=$(gh api "repos/$GITHUB_REPOSITORY/pages/deployments" \ - -F artifact_id="$ARTIFACT_ID" -f pages_build_version="$BUILD_VERSION" -f oidc_token="$oidc" -q .status_url) - echo "deployment $BUILD_VERSION" - status= - for _ in $(seq 100); do - sleep 5 - status=$(gh api "$status_url" -q .status || echo unknown_status) - echo "status: $status" - case $status in - succeed) break ;; - deployment_failed|deployment_content_failed|deployment_cancelled|deployment_lost) exit 1 ;; - esac - done - [ "$status" = succeed ] || { echo "no result after 500 s"; exit 1; } - echo "page_url=$(gh api "repos/$GITHUB_REPOSITORY/pages" -q .html_url)" >> "$GITHUB_OUTPUT" + uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1 From a23f28cfacb259f34d2194628fdd99a76fd30dc2 Mon Sep 17 00:00:00 2001 From: FilipNone <165696124+FilipNone@users.noreply.github.com> Date: Thu, 26 Nov 2026 13:56:22 +0100 Subject: [PATCH 2/2] ci(pages): say that a release on a deployed commit does not change the site --- .github/workflows/pages.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index a9f9712..3f62e34 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -2,9 +2,12 @@ name: Pages # Builds the browser tool in web/ with the firmware file from the latest # release, checked against its SHA-256, and publishes it to GitHub Pages. -# Publishing a release redeploys the site if the github-pages environment -# allows v* tags. Enable Pages with "GitHub Actions" as the source in the -# repository settings. +# Publishing a release runs it again (the github-pages environment allows v* +# tags), but Pages keeps the first deployment of each commit and only takes +# a commit as the build version (actions/deploy-pages#383). A release on a +# commit that was already deployed, the usual case, leaves the site as it +# was; the next push to main publishes it. Enable Pages with "GitHub +# Actions" as the source in the repository settings. on: push: