Skip to content

Commit f4df06d

Browse files
committed
docs: Add CI/CD documentation and update README
- Create docs/cicd/README.md with frontend CI/CD overview - Document all 5 GitHub Actions workflows - Explain PR preview environment integration with backend - Point to backend repo for comprehensive CI/CD documentation - Update main README.md with CI/CD & Deployment section - Reorganize PR Preview Environments as subsection of CI/CD
1 parent 3d8721c commit f4df06d

File tree

2 files changed

+94
-3
lines changed

2 files changed

+94
-3
lines changed

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,20 @@ For more detailed testing information, see [docs/testing/frontend-testing-strate
159159

160160
---
161161

162-
## PR Preview Environments
162+
## CI/CD & Deployment
163+
164+
This project uses GitHub Actions for continuous integration, release builds, and deployment.
165+
166+
- **Branch CI**: Automated linting, testing, and Docker builds on every push/PR
167+
- **Release Builds**: Multi-architecture production images triggered by GitHub releases
168+
- **Deployment**: Manual deployment to DigitalOcean via secure Tailscale VPN
169+
- **PR Previews**: Automatic preview environments for each pull request
170+
171+
📚 **Documentation:** [docs/cicd/README.md](docs/cicd/README.md)
172+
173+
**Note:** The frontend shares CI/CD infrastructure with the backend repository. For comprehensive documentation including PR preview workflows, see the [Backend CI/CD Documentation](https://github.com/refactor-group/refactor-platform-rs/tree/main/docs/cicd).
174+
175+
### PR Preview Environments
163176

164177
This repository automatically deploys **isolated preview environments** for each pull request. When you open a PR, a complete stack (backend + frontend + database) deploys to a dedicated server on our Tailnet for testing before merge.
165178

@@ -170,5 +183,3 @@ This repository automatically deploys **isolated preview environments** for each
170183
- ✅ PR closed/merged → Environment cleans up
171184

172185
**Access:** Requires Tailscale VPN connection. Access URLs are posted as a comment on your PR in the GitHub Web UI.
173-
174-
For detailed information, see the [PR Preview Environments Runbook](docs/runbooks/pr-preview-environments.md).

docs/cicd/README.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# CI/CD Infrastructure - Frontend
2+
3+
## Overview
4+
5+
The Refactor Platform frontend uses GitHub Actions for continuous integration, release builds, and PR preview deployments. The CI/CD infrastructure is shared with the backend repository.
6+
7+
**Quick Stats:**
8+
- **5 GitHub Actions Workflows** (CI, Release, Deploy, PR Preview x2)
9+
- **Docker-based Deployment** to GitHub Container Registry (GHCR)
10+
- **Production Platform:** DigitalOcean (accessed via Tailscale VPN)
11+
- **Preview Platform:** Raspberry Pi 5 (ARM64, coordinated with backend)
12+
13+
---
14+
15+
## Workflows
16+
17+
### 1. Branch CI Pipeline
18+
**File:** `.github/workflows/build_and_push_nonproduction_images.yml`
19+
**Triggers:** Push to main, Pull requests to main
20+
21+
Runs linting, testing, and builds Docker images for non-production branches.
22+
23+
### 2. Production Release Builds
24+
**File:** `.github/workflows/build_and_push_production_images.yml`
25+
**Triggers:** GitHub releases (type: released), Manual dispatch
26+
27+
Builds multi-architecture stable images for production deployment.
28+
29+
### 3. Production Deployment
30+
**File:** `.github/workflows/deploy_to_do.yml`
31+
**Triggers:** Manual dispatch only
32+
33+
Deploys to DigitalOcean via Tailscale VPN (coordinated with backend deployment).
34+
35+
### 4. Frontend PR Preview
36+
**File:** `.github/workflows/pr-preview-frontend.yml` (on branch 225)
37+
**Triggers:** Pull request opened/synchronize/reopened (frontend changes)
38+
39+
Calls the backend repository's reusable workflow to deploy PR preview environments.
40+
41+
**Parameters:**
42+
- `repo_type: 'frontend'`
43+
- `pr_number`: PR number
44+
- `branch_name`: Frontend PR branch
45+
- `backend_branch`: 'main' (or temporary override)
46+
47+
### 5. Frontend PR Cleanup
48+
**File:** `.github/workflows/cleanup-pr-preview-frontend.yml` (on branch 225)
49+
**Triggers:** Pull request closed/merged
50+
51+
Calls the backend repository's reusable cleanup workflow.
52+
53+
---
54+
55+
## PR Preview Environments
56+
57+
Frontend PRs trigger the same preview environment infrastructure as backend PRs. The workflows call reusable workflows in the backend repository:
58+
59+
- **Deployment:** `refactor-group/refactor-platform-rs/.github/workflows/ci-deploy-pr-preview.yml`
60+
- **Cleanup:** `refactor-group/refactor-platform-rs/.github/workflows/cleanup-pr-preview.yml`
61+
62+
This ensures parity between frontend and backend PR previews - both create isolated full-stack environments with unique ports.
63+
64+
**Access:** Requires Tailscale VPN connection. Preview URLs are posted as PR comments.
65+
66+
---
67+
68+
## Comprehensive Documentation
69+
70+
For complete CI/CD infrastructure documentation, including:
71+
- Detailed workflow specifications
72+
- Docker infrastructure guides
73+
- Database migration workflows
74+
- Security and secrets management
75+
- Troubleshooting guides
76+
- Gap analysis and future improvements
77+
78+
See: **[Backend Repository CI/CD Docs](https://github.com/refactor-group/refactor-platform-rs/tree/main/docs/cicd)**
79+
80+
The backend repository contains the authoritative documentation for the shared CI/CD infrastructure, including the reusable workflows that both repositories use for PR preview deployments.

0 commit comments

Comments
 (0)