ops: deploy app.logicsrc.com to dev2 on merge (#216)

* ops: deploy app.logicsrc.com to dev2 on merge

Railway deployed this on push; dev2 does not by itself. The workflow ssh's
to the box and runs /home/anthony/www/app.logicsrc.com/deploy-app.sh, which builds
the image from this checkout and restarts the compose stack. Generated by
cli-tools dev2/dev2-site scaffold.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* ops: stop committing the nixpacks build plan

`railway up` writes .nixpacks/ into the working tree: a Dockerfile, a
nixpkgs pin, and a build.sh that hard-codes the absolute path of the
worktree it ran in plus a one-off image tag. None of it is reusable and
no workflow reads it, so every branch that deploys regenerates it and
conflicts with the last one -- which is exactly how this branch ended up
CONFLICTING against master.

Drop it and ignore it.

* ops: drop the nixpacks build plan master picked up in #215

Same detritus, same stale absolute path (a worktree that no longer
exists). Now ignored, so it will not come back.

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Anthony Ettinger 2026-09-25 05:52:37 -07:00 • committed by GitHub
parent f4780259fd
commit 587c073f72
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 65 additions and 58 deletions

View file

@ -0,0 +1,60 @@
# Ship every merge to dev2, where app.logicsrc.com runs since it left Railway (which
# deployed on merge by itself). The box pulls the merged commit, rebuilds the
# image(s) from this repo and restarts the compose stack under
# /home/anthony/www/app.logicsrc.com. Generated by cli-tools/dev2/dev2-site scaffold.
name: Deploy to dev2
on:
push:
branches: [master]
workflow_dispatch:
inputs:
ref:
description: Git ref to deploy (defaults to the pushed commit)
required: false
type: string
concurrency:
group: deploy-dev2
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
# ${{ }} values go through env, never straight into a run: body.
- name: Resolve target revision
id: rev
env:
REF: ${{ inputs.ref || github.sha }}
run: echo "sha=$REF" >> "$GITHUB_OUTPUT"
- name: Set up ssh
env:
SSH_KEY: ${{ secrets.DEV2_SSH_KEY }}
KNOWN_HOSTS: ${{ secrets.DEV2_KNOWN_HOSTS }}
run: |
install -d -m 700 ~/.ssh
printf '%s\n' "$SSH_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
printf '%s\n' "$KNOWN_HOSTS" > ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts
- name: Deploy
env:
DEV2_USER: ${{ secrets.DEV2_USER }}
DEV2_HOST: ${{ secrets.DEV2_HOST }}
SHA: ${{ steps.rev.outputs.sha }}
run: |
ssh -o BatchMode=yes "$DEV2_USER@$DEV2_HOST" \
/home/anthony/www/app.logicsrc.com/deploy-app.sh "$SHA"
- name: Verify the site answers
run: |
for i in $(seq 1 10); do
code=$(curl -s -o /dev/null -w '%{http_code}' "https://app.logicsrc.com/" || true)
case "$code" in 2*|3*|401|403) echo "app.logicsrc.com $code"; exit 0;; esac
echo "attempt $i: $code"; sleep 10
done
echo "app.logicsrc.com never answered"; exit 1