Repository navigation
ci(pages): give every deploy its own build version - #18
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
maina few minutes earlier, which still had 0.5.0.Both deploys had build version
98a4ee5…, becauseactions/deploy-pagesalways uses the commit. Pages keeps the first deployment of a build version, soGET /pages/deployments/98a4ee5…shows one deployment, built before the release existed. A release is normally published on the commitmainwas last deployed from, so this would happen every time.Approach
The deploy step makes the same API calls as
actions/deploy-pages:POST /pages/deploymentswith the artifact from the build job.succeedor one of the action's final error states.The only difference is the build version,
<commit>-<run id>-<attempt>, so every run deploys.deploy-pageshas no input for it, andGITHUB_SHAcannot be overridden.Automated validation
make -C firmwarebuilds without warnings: no firmware changemake -C firmware testpasses: no code changeThe YAML parses and the script passes
bash -n. Pages does not run on pull requests, so the real check comes after merging:Hardware testing
Limitations and follow-up
Dependabot no longer updates the deploy step, because it no longer uses
actions/deploy-pages.