Add VPS deploy job to CI; canonical repo is now bmx269/smallrobot - #8
Merged
Conversation
The deploy job rsyncs the built artifact to the Virtualmin host over SSH — on push to main, and via manual dispatch from any branch so `vue` can get a staging deploy before it merges. Builds stay in CI, never on the VPS, so the deploy only ever ships an artifact that already passed typecheck, tests and generate. Until the four DEPLOY_* secrets exist the job skips with a notice instead of failing, keeping CI green while hosting is being stood up. (Secrets cannot be read in a job-level `if`, so presence is exposed through an env var.) One trap defused: actions/upload-artifact v4.4+ excludes hidden files by default, which would have silently dropped .htaccess — the file the whole Apache setup depends on — from the artifact. include-hidden-files is now explicit, and the deploy verifies .htaccess landed on the server after rsync. Deploying as the Virtualmin domain user rather than root means files arrive owned correctly with no chown pass. rsync --delete keeps the docroot an exact mirror of the build; the known non-atomicity (a second of torn state mid-deploy) is documented in place along with the symlink-swap upgrade path. Repo migration: the smallrobotco org remote is removed and bmx269/smallrobot is now `origin`. Netlify watches the org repo, which is exactly why nothing should be pushed there during the migration — the fork's main is at the same commit (bf224ed), so nothing is lost. Co-Authored-By: Claude Fable 5 <noreply@anthropic.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.
The deploy job rsyncs the built artifact to the Virtualmin host over SSH — on push to main, and via manual dispatch from any branch so
vuecan get a staging deploy before it merges. Builds stay in CI, never on the VPS, so the deploy only ever ships an artifact that already passed typecheck, tests and generate. Until the four DEPLOY_* secrets exist the job skips with a notice instead of failing, keeping CI green while hosting is being stood up. (Secrets cannot be read in a job-levelif, so presence is exposed through an env var.)One trap defused: actions/upload-artifact v4.4+ excludes hidden files by default, which would have silently dropped .htaccess — the file the whole Apache setup depends on — from the artifact. include-hidden-files is now explicit, and the deploy verifies .htaccess landed on the server after rsync.
Deploying as the Virtualmin domain user rather than root means files arrive owned correctly with no chown pass. rsync --delete keeps the docroot an exact mirror of the build; the known non-atomicity (a second of torn state mid-deploy) is documented in place along with the symlink-swap upgrade path.
Repo migration: the smallrobotco org remote is removed and bmx269/smallrobot is now
origin. Netlify watches the org repo, which is exactly why nothing should be pushed there during the migration — the fork's main is at the same commit (bf224ed), so nothing is lost.