feat(ci): Forgejo Actions deploy workflow (#30) #34
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/deploy-workflow"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #30. Last piece of the deploy pipeline (#28 image, #29 compose, this: automation).
Summary
.forgejo/workflows/deploy.ymltriggers on push tomain,runs-on: homelab(container mode, has Node.js and the host'sDocker socket mounted).
.env+docker compose pull+up -d→ healthz smoke.${{ github.sha }}andlatest; thecompose file reads the SHA from
QUARTERMASTER_TAGwritten bythe workflow into
.env.host's Docker socket bind-mounted, so
docker composefrom therunner manages the production container directly. Drops the
otherwise-needed
DEPLOY_SSH_KEY+DEPLOY_KNOWN_HOSTSsecretsand the associated private-key-handling risk surface.
COMPOSE_PROJECT_NAME=quartermasteris pinned in the workflow envso compose identifies the existing container by project label no
matter which path the runner happened to unpack the checkout into.
curl -fsS -u admin:… https://quartermaster.unbiasedgeek.com/healthzwith up to 10 × 3 s retries — catches TLS, Traefik routing, and
basic-auth middleware regressions in a single probe.
required secrets, and the v1 rollback recipe (revert
mainorpin
QUARTERMASTER_TAGto a prior SHA).Secrets
Both repo-scoped on
archeious/quartermaster, already provisioned:REGISTRY_TOKEN— archeious Forgejo PAT withread:package+write:package, used as the docker-loginpassword against
forgejo.labbity.unbiasedgeek.com.QUARTERMASTER_SMOKE_PASSWORD— plaintext basic-auth passwordfor the
adminuser, used by the post-deploy healthz probe.Test plan
match expectations (validated via pyyaml in the #28 image).
Forgejo Actions secrets listing.
builds + pushes,
docker compose up -drolls the container,healthz returns 200 through the public URL. Flagging any
failure of that first run is its own follow-up if needed.