GitHub Actions CI/CD for Static Sites: From Push to Production in 2 Minutes

GitHub Actions is GitHub's built-in CI/CD engine that runs scripts on push, pull request, or schedule. For GitHub CMS, it automates the entire cycle: after git push, code builds via Vite SSG, 368 tests validate content and security, files sync to VPS via rsync, and a symlink atomically switches versions — 2 minutes from push to production with zero downtime.

7 Stages of the CI/CD Pipeline

1

git push — trigger

Push to main. GitHub Actions triggers on paths-filter: content/, src/, scripts/.

2-4

Build + validate + SEO

npm ci → vite-ssg build → inject:seo. 368 tests validate JSON-LD, secrets, content.

5-7

Rsync + symlink + health-check

rsync uploads dist/ to releases/. symlink switches atomically. curl checks /, /healthz, /sitemap.xml.

FAQ

Is GitHub Actions free for private repos?

Yes — 2,000 minutes/month free for private repos. A GitHub CMS build takes 2-5 minutes, so the limit covers 400+ deploys per month.

What if tests fail — is deployment blocked?

Yes. If JSON-LD validation or secret checks find errors, the build exits with error and rsync is not triggered. The site stays on the previous version.

Set Up CI/CD in 15 Minutes

GitHub CMS Pro — ready deploy.yml. Just add VPS_HOST and SSH key to Secrets.