|
| 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