Publish the site as a container on the cluster instead of the pages branch
CI / test (pull_request) Successful in 42s

Every push to main builds the page into an nginx image and pushes it to
harbor.kenschiano.net/home/threshing-atlas; Argo CD Image Updater rolls the
deployment (kubefiles web/threshing-atlas) at https://threshingatlas.kenschiano.net.
forge.yaml now names that address.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-21 20:38:46 -05:00
co-authored by Claude Opus 5.5
parent 87217037bb
commit bbea5db2ee
7 changed files with 74 additions and 41 deletions
+30
View File
@@ -0,0 +1,30 @@
# The published Atlas page. Every push to main (every merged pull request, and the data bot's daily commits) builds
# the site into a container image and pushes it to Harbor. Argo CD Image Updater watches the `latest` digest and
# rolls the deployment in kubefiles (web/threshing-atlas), serving https://threshingatlas.kenschiano.net.
#
# Secrets: HARBOR_USERNAME and HARBOR_PASSWORD, a Harbor robot account with push access to the `home` project.
name: Publish the site (container image)
on:
push:
branches: [main]
workflow_dispatch:
concurrency:
group: image
cancel-in-progress: true
env:
IMAGE: harbor.kenschiano.net/home/threshing-atlas
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build and push
env:
HARBOR_USERNAME: ${{ secrets.HARBOR_USERNAME }}
HARBOR_PASSWORD: ${{ secrets.HARBOR_PASSWORD }}
run: |
echo "$HARBOR_PASSWORD" | docker login harbor.kenschiano.net -u "$HARBOR_USERNAME" --password-stdin
docker build -t "$IMAGE:latest" -t "$IMAGE:${GITHUB_SHA::8}" .
docker push "$IMAGE:latest"
docker push "$IMAGE:${GITHUB_SHA::8}"
echo "pushed $IMAGE:latest (${GITHUB_SHA::8})"
-37
View File
@@ -1,37 +0,0 @@
# The published Atlas page. Every push to main builds the static site (npm run build -> dist/) and force-pushes it
# as the single commit of the `pages` branch. Ken's server serves that branch as plain files (a web server whose
# folder is kept in step with the branch: a git-sync sidecar, or `git pull` on a timer). The repository is public,
# so his server needs no token. Only the build output is on `pages`, never the raw data.
#
# Secrets: ATLAS_BOT_TOKEN (as in update-sources.yml), to push the branch.
name: Publish the site (pages branch)
on:
push:
branches: [main]
workflow_dispatch:
concurrency:
group: pages
cancel-in-progress: true
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm run build
- name: Push dist/ as the pages branch
env:
ATLAS_BOT_TOKEN: ${{ secrets.ATLAS_BOT_TOKEN }}
run: |
cd dist
git init -q -b pages
git config user.name "Atlas data bot"
git config user.email "atlas-bot@noreply.localhost"
git add -A
git commit -q -m "site built from ${GITHUB_SHA::8}"
GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0="http.https://git.kenschiano.net/.extraheader" \
GIT_CONFIG_VALUE_0="AUTHORIZATION: token $ATLAS_BOT_TOKEN" \
git push -q -f "https://git.kenschiano.net/${GITHUB_REPOSITORY}.git" pages
echo "pages branch updated from ${GITHUB_SHA::8}"