Skip to content

ci(pages): give every deploy its own build version - #18

Merged
FilipNone merged 1 commit into
mainfrom
ci/pages-deploy-every-run
Nov 26, 2026
Merged

FilipNone merged 1 commit into
mainfrom
ci/pages-deploy-every-run

Conversation

@FilipNone

Copy link
Copy Markdown
Owner

Problem

The 0.6.0 release did not reach the web tool. Publishing it ran the Pages workflow, which fetched the 0.6.0 firmware and deployed. But the site kept serving the build from the push to main a few minutes earlier, which still had 0.5.0.

Both deploys had build version 98a4ee5…, because actions/deploy-pages always uses the commit. Pages keeps the first deployment of a build version, so GET /pages/deployments/98a4ee5… shows one deployment, built before the release existed. A release is normally published on the commit main was last deployed from, so this would happen every time.

Approach

The deploy step makes the same API calls as actions/deploy-pages:

  • An OIDC token, then POST /pages/deployments with the artifact from the build job.
  • Polling the status until succeed or one of the action's final error states.

The only difference is the build version, <commit>-<run id>-<attempt>, so every run deploys. deploy-pages has no input for it, and GITHUB_SHA cannot be overridden.

Automated validation

  • make -C firmware builds without warnings: no firmware change
  • make -C firmware test passes: no code change
  • CI passes on the latest commit
  • Code review of the diff done and findings resolved

The YAML parses and the script passes bash -n. Pages does not run on pull requests, so the real check comes after merging:

  • The merge push should deploy 0.6.0.
  • A manual run on the same commit should deploy again. That is the case that failed.

Hardware testing

  • Not needed: workflow only.

Limitations and follow-up

Dependabot no longer updates the deploy step, because it no longer uses actions/deploy-pages.

Pages keeps the first deployment of each build version, and deploy-pages
always uses the commit. The 0.6.0 release was published on the commit main
had just been deployed from, so its redeploy changed nothing and the site
kept offering 0.5.0. The deploy step now makes the same API calls with the
run ID in the version.
@FilipNone
FilipNone merged commit 371769c into main Nov 26, 2026
8 checks passed
@FilipNone
FilipNone deleted the ci/pages-deploy-every-run branch November 26, 2026 12:54
@FilipNone FilipNone mentioned this pull request Nov 26, 2026
2 of 5 tasks
FilipNone added a commit that referenced this pull request Nov 26, 2026
* Revert "ci(pages): give every deploy its own build version (#18)"

This reverts commit 371769c.

* ci(pages): say that a release on a deployed commit does not change the site
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant