190 add a staging environment for previewing and testing ahead of a new deployment - #201
Merged
lmcdonough merged 24 commits intoFeb 27, 2026
Conversation
lmcdonough
had a problem deploying
to
pr-preview
October 23, 2025 23:53 — with
GitHub Actions
Failure
lmcdonough
had a problem deploying
to
pr-preview
October 28, 2025 00:51 — with
GitHub Actions
Failure
lmcdonough
had a problem deploying
to
pr-preview
October 28, 2025 17:40 — with
GitHub Actions
Failure
lmcdonough
had a problem deploying
to
pr-preview
October 28, 2025 18:02 — with
GitHub Actions
Failure
lmcdonough
had a problem deploying
to
pr-preview
October 31, 2025 13:56 — with
GitHub Actions
Failure
lmcdonough
had a problem deploying
to
pr-preview
October 31, 2025 14:22 — with
GitHub Actions
Failure
lmcdonough
had a problem deploying
to
pr-preview
October 31, 2025 14:31 — with
GitHub Actions
Failure
lmcdonough
had a problem deploying
to
pr-preview
October 31, 2025 14:53 — with
GitHub Actions
Failure
lmcdonough
had a problem deploying
to
pr-preview
October 31, 2025 16:21 — with
GitHub Actions
Failure
lmcdonough
had a problem deploying
to
pr-preview
October 31, 2025 16:28 — with
GitHub Actions
Failure
lmcdonough
had a problem deploying
to
pr-preview
October 31, 2025 16:31 — with
GitHub Actions
Failure
lmcdonough
had a problem deploying
to
pr-preview
November 2, 2025 00:26 — with
GitHub Actions
Failure
Use AllowOrigin::mirror_request() when ALLOWED_ORIGINS contains "*" to support credentials with wildcard origins. The browser rejects Access-Control-Allow-Origin: * when credentials are included, so we mirror the request's Origin header instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- docs/cicd/README.md: CI/CD pipeline overview and architecture - docs/cicd/pr-preview-environments.md: PR preview system documentation - docs/cicd/future-improvements.md: planned enhancements - docs/cicd/gap-analysis.md: current vs desired state analysis - Reorganize runbooks into docs/cicd/ (docker-quickstart, production-deployment) - README.md: add CI/CD documentation section - .gitignore: add new ignore rules - .vscode/settings.json: remove from tracking (already in .gitignore) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Document reusable workflow architecture, Docker Compose PR preview stack, nginx path-based routing, CORS wildcard handling, entrypoint schema flow, and secrets resolution order with stale secret warning.
…iews The pr-preview environment secrets (MailerSend, Tiptap) were empty when the frontend repo called the reusable workflow because GitHub Actions resolves environment secrets from the caller repo, not the callee. - Make welcome email non-fatal in user creation (if-let-Err + warn log) - Add || 'UNUSED' fallbacks for 6 backend-specific secrets in .env heredoc - Fix misleading comments about cross-repo environment resolution - Add dedicated SSE location blocks to both nginx preview configs - Create deploy-pr-preview-dispatch.yml for correct secret resolution - Fix frontend checkout steps to use explicit repository parameter
Added 7 missing directories: docs, events, nginx, nginx-preview, scripts, sse, and testing-tools. Added brief descriptions for each.
Added SESSION_SCHEDULED_EMAIL_TEMPLATE_ID, ACTION_ASSIGNED_EMAIL_TEMPLATE_ID, and FRONTEND_BASE_URL to the email configuration section.
Addresses review comment by jhodapp on docker-compose.pr-preview.yaml:84
Addresses review comment by jhodapp on build-test-push.yml:47
Addresses review comment by jhodapp on build-test-push.yml:51
Addresses review comment by jhodapp on ci-deploy-pr-preview.yml:955
Addresses review comment by jhodapp on web/src/lib.rs:137
Addresses review comment by jhodapp on ci-deploy-pr-preview.yml:791
Addresses review comment by jhodapp on ci-deploy-pr-preview.yml:867
Collaborator
Author
|
Already addressed. |
- Add EXIT trap for secrets env file cleanup on deploy failure (ci-deploy-pr-preview.yml). Without this, set -eo pipefail exits would leave DB passwords, GHCR PAT, and API keys on disk. - Use StrictHostKeyChecking=yes in cleanup workflow to match deploy workflow (cleanup-pr-preview.yml). Fixes inconsistency where deploy used strict checking but cleanup used accept-new. - Make PR preview lint gates match main CI: add -D warnings to clippy, remove continue-on-error from fmt (ci-deploy-pr-preview.yml). - Fix clippy warnings: allow too_many_arguments on send_action_assigned_email, remove needless borrow in test code. - Apply cargo fmt to all files.
Backend PRs were reusing the main-arm64 frontend image which has basePath="" baked in. Next.js basePath is a build-time config, so PR previews needing basePath="/pr-<NUM>" for sub-path routing got 404s on all _next/static/* assets. Now frontend is always built with the correct NEXT_PUBLIC_BASE_PATH regardless of repo_type. Also adds branch fallback logic to checkout steps: if a specified branch has been deleted (e.g. after merge), checkout falls back to main for zero-downtime transitions.
Override images (backend_image/frontend_image inputs) previously set build_mode='skip' unconditionally. If the override pointed to a deleted or nonexistent image, the workflow failed at docker pull with no fallback. Now validates overrides with docker manifest inspect — if missing, falls back to building from source.
Frontend main branch lacks basePath support (NEXT_PUBLIC_BASE_PATH in Dockerfile and next.config.mjs), causing _next/static/ asset 404s in backend PR preview environments. Point to frontend feature branch 225 until PR #226 merges to main.
This comment was marked as resolved.
This comment was marked as resolved.
…-and-testing-ahead-of-a-new-deployment
Resolve merge conflicts in domain/src/emails.rs and web/src/controller/organization/user_controller.rs by taking main's refactored email patterns (ResolvedEmailConfig, private send functions, internal error handling).
Removes the "Access Requirements" section that mentioned Tailscale from the automated PR comment template to avoid revealing internal network infrastructure details. Addresses review comment by jhodapp on PR #201
Collaborator
Author
|
Removed the Access Requirements section from the PR comment template. |
Contributor
🚀 PR Preview Environment Deployed!🔗 Access URLs
📊 Environment Details
🧪 Testing# Health check
curl http://neo/pr-201/health
# Frontend
curl http://neo/pr-201/
# API test
curl http://neo/pr-201/api/v1/users🧹 CleanupEnvironment auto-cleaned when PR closes/merges Deployed: 2026-02-24T22:20:00.551Z |
jhodapp
approved these changes
Feb 25, 2026
Member
|
@lmcdonough approved from both Caleb and me. Before merging, you've got one merge conflict to take care of which Claude should be able to help you with if it's at all confusing. |
Resolve conflict in web/src/lib.rs keeping wildcard CORS logic for PR preview environments while incorporating main's changes.
Use PR_PREVIEW_FRONTEND_BRANCH repo variable instead of hardcoding the frontend feature branch name. Falls back to 'main' when the variable is unset or empty, eliminating post-merge code changes.
Contributor
🧹 PR Preview Environment Cleaned Up!📊 Cleanup Summary
📝 Details
💡 Layer Caching Strategy
Cleaned up: 2026-02-27T17:14:01.811Z |
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.
🚀 Add Automated PR Preview Deployments
Implements isolated staging environments for every pull request.
What This Does
Architecture
4000 + PR_NUMBER5432 + PR_NUMBERpr-{number}(complete isolation)ghcr.io/owner/repo:pr-{number}Files Added
.github/workflows/deploy-pr-preview.yml- Deployment automation.github/workflows/cleanup-pr-preview.yml- Cleanup automationdocker-compose.pr-preview.yaml- Multi-tenant templatedocs/PR-PREVIEW.md- Usage documentationAccess