CI/CD: GitHub Actions + auto-deploy to GCP VM#8
Merged
Conversation
- ci.yml: fast gate on push/PR — frontend pnpm build + deterministic backend `pytest tests/unit` (no Gemini key → real-LLM tests auto-skip) + alembic migration smoke. - ci-full.yml: full real-Gemini suite, nightly + manual. - deploy.yml: on merge to main — build frontend, bundle app, scp to the ir-civil-agent VM, write .env from secrets, uv sync + alembic upgrade, restart the ir-agent systemd service (auth via gcloud service account). - deploy/: bootstrap.sh (one-time VM setup), ir-agent.service (systemd), deploy-remote.sh (on-VM deploy step), README.md (secrets/vars + steps). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Shell scripts and the systemd unit run on the Linux VM; CRLF would break them regardless of a contributor's local core.autocrlf. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The deploy config stores these as repository variables (user choice), so reference them via vars.* — secrets.* would resolve empty. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The VM base image (Ubuntu questing) has no python3.11 package, and uv fetches a standalone CPython >=3.11 per pyproject anyway. Keeps bootstrap independent of the base image's Python version. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…mat) frontend/pnpm-workspace.yaml uses the pnpm v10+ settings schema (allowBuilds, no packages field). pnpm 9 rejected it with "packages field missing or empty". Pin to 11 to match the local toolchain + lockfile. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
pnpm 11 requires the node:sqlite built-in (Node 22+). Node 20 crashed with ERR_UNKNOWN_BUILTIN_MODULE. Node 24 also clears the runner's Node 20 deprecation warnings; Next 15 builds fine on it. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Adds CI + auto-deploy to the ir-civil-agent GCP VM.
Workflows
pnpm build+ deterministicpytest tests/unit(no Gemini key → real-LLM tests auto-skip) + alembic migration smoke.env→uv sync+alembic upgrade→ restartir-agentsystemd service (gcloud service-account auth)deploy/
bootstrap.sh(one-time VM setup),ir-agent.service(systemd),deploy-remote.sh(on-VM step),README.md.Setup already done
Merging triggers the first deploy → app at http://34.136.42.41:8001/app/
🤖 Generated with Claude Code