Repository navigation
feat(ci): deploy pre-release releases to the dev Pages branch - #18
Merged
Merged
Conversation
Publishing an rc used to deploy to the same `main` branch as a real release, so an rc landed on production the moment it was published. Now the deploy workflow reads `github.event.release.prerelease` and picks `dev` for a pre-release, `main` otherwise, so an rc goes to dev.cryptos-pki-www.pages.dev and only a normal release reaches cryptos-pki.com. Refs #17 Signed-off-by: Bugs5382 <12115015+Bugs5382@users.noreply.github.com>
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.
What and why
Publishing an rc deployed to the same place a real release does:
job-deploy-release.yamlalwaysused
--branch=main, so an rc went straight to production at cryptos-pki.com. I want to look at anrc before it's live, so this makes the deploy branch depend on whether the release is marked
pre-release.
Determine the deploy branchstep that readsgithub.event.release.prereleaseand setsan output of
devormain.pages deploystep now uses that output for--branchinstead of a hardcodedmain.cloudflare/wrangler-actionSHA, the separatelist/create-project steps, and the secrets.
docs/deploy.mdto explain the dev vs. production split.Release Drafter still drafts plain SemVer tags; I tick "Set as a pre-release" by hand on the
GitHub release before publishing an rc.
Closes #17
Test plan
actionlintpasses on the changed workflow and on the whole.github/workflows/tree.dev.cryptos-pki-www.pages.dev(verified when I cut one).cryptos-pki.com(verified on the next real release).