Add automated production deployment workflow#74
Merged
Conversation
Replace the manual "pull from upstream, push" sync flow with a workflow
that, on push to main, rebuilds with BASE_PATH=/ and pushes the artifact
to celestiary/celestiary.github.io's gh-pages branch via JamesIves's
github-pages-deploy-action using an SSH deploy key
(secret CELESTIARY_GITHUB_IO_DEPLOY_KEY).
The deploy job is gated on the secret existing so first-time setup
doesn't fail the workflow before keys are wired up. Build runs twice on
push to main (BASE_PATH=/web/ for the project page, BASE_PATH=/ for the
user page) — the JS bundle is identical since base resolution is
runtime-derived from <base href>, only the HTML template differs.
README's Deploy section now documents the project / user / preview
flows instead of the manual git-pull-push recipe.
One-time setup (cannot be automated from this repo):
- generate an ed25519 keypair
- add public half as a Deploy Key with write access on
celestiary/celestiary.github.io
- add private half as secret CELESTIARY_GITHUB_IO_DEPLOY_KEY here
- on celestiary.github.io: Pages -> Deploy from branch -> gh-pages / (root)
- on celestiary.github.io: disable the existing gh-pages.yml workflow
so it doesn't fight with these pushes
|
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.
Summary
Adds automated deployment of the built site to the production
celestiary.github.iorepository on every push tomain, and updates deployment documentation to reflect the new workflow.Changes
.github/workflows/deploy-prod.ymlautomatically builds the site withBASE_PATH=/and deploys to thecelestiary/celestiary.github.iorepository'sgh-pagesbranch via SSH deploy keyREADME.mdnow explains both deployment paths:celestiary.github.io/web/(via existinggh-pages.yml)celestiary.github.io/(via newdeploy-prod.yml)celestiary.github.io/web/pr-preview/pr-NNN/(via existingpr-preview.yml)Implementation Details
CELESTIARY_GITHUB_IO_DEPLOY_KEYsecret being configured, allowing graceful handling during initial setupJamesIves/github-pages-deploy-action@v4.8.0to push built artifacts to the external repositoryhttps://claude.ai/code/session_01UidMryu4p3799b8osxdtPR