scope workflows

This commit is contained in:
Alex Holliday committed 2026-07-09 11:24:35 -07:00
1 parent 91343f996b
commit ceacaa5499
3 files changed
+19 -18

No files matched your search

+9 -11
View File
@@ -2,9 +2,7 @@ name: Build image
on:
push:
# chore/simplify-deployment is temporary, for pre-merge testing of this
# workflow itself — remove before merge
branches: ["develop", "master", "demo", "chore/simplify-deployment"]
branches: ["develop", "master"]
tags: ["v*"]
workflow_dispatch:
@@ -64,8 +62,8 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
# The hosted demo/staging instances share one host and one compose file; a
# deploy recreates whichever service's image tag was just pushed.
# The hosted staging/prod instances share one host and one compose file; each
# deploy pulls and recreates only its own service.
deploy-staging:
needs: build-and-push
if: github.ref == 'refs/heads/develop'
@@ -81,13 +79,13 @@ jobs:
cd checkmate
git pull
cd docs/hosting/checkmate-so
docker compose pull
docker compose up -d
docker compose pull checkmate-staging
docker compose up -d checkmate-staging
docker system prune -af
deploy-demo:
deploy-prod:
needs: build-and-push
if: github.ref == 'refs/heads/demo'
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: Deploy demo.checkmate.so
@@ -100,6 +98,6 @@ jobs:
cd checkmate
git pull
cd docs/hosting/checkmate-so
docker compose pull
docker compose up -d
docker compose pull checkmate-demo
docker compose up -d checkmate-demo
docker system prune -af
+8 -5
View File
@@ -12,13 +12,16 @@ image behind a TLS reverse proxy.
## How deploys work
`.github/workflows/build-image.yml` builds and pushes the image, then SSHes in
and runs `docker compose pull && docker compose up -d` in this directory:
and runs `docker compose pull <service> && docker compose up -d <service>` in
this directory:
- push to `develop` → image tagged `:develop` → `checkmate-staging` recreated
- push to `demo` → image tagged `:demo` → `checkmate-demo` recreated
- merge to `develop` → image tagged `:develop` → `checkmate-staging` recreated
- merge to `master` → image tagged `:master` → `checkmate-demo` (prod) recreated
The host keeps a git checkout of this repo; the deploy does `git pull` first so
compose/gateway changes land with the code.
The host keeps a git checkout of this repo (on `develop`); the deploy does
`git pull` first so compose changes land with the code. Note the deploy only
recreates the checkmate service — changes to `gateway/nginx.conf` or the mongo
services need a manual `docker compose up -d` / gateway restart on the host.
## Host-local files (not committed)
@@ -20,9 +20,9 @@ services:
- /etc/letsencrypt:/etc/nginx/ssl:ro
- ./gateway/nginx.conf:/etc/nginx/conf.d/default.conf:ro
# Demo: demo.checkmate.so -----
# Prod: demo.checkmate.so -----
checkmate-demo:
image: ghcr.io/bluewave-labs/checkmate:demo
image: ghcr.io/bluewave-labs/checkmate:master
container_name: checkmate-demo
restart: always
env_file: