CI / CD
CI/CD configuration running on GitHub Actions. Workflow files are in .github/workflows/.
Workflows
| File | Trigger | Pipeline |
|---|---|---|
main-deploy.yml | Push to main | Build → E2E tests → Production deploy |
pr-checks.yml | PR targeting main | Build → Preview deploy |
main-deploy.yml: Production Deploy
Runs on every push to the main branch.
Job Flow
- Build — Build the Next.js blog (
pnpm build) and Docusaurus doc site (pnpm doc:build) - E2E Tests — Run Playwright smoke tests against the blog build output
- Deploy — Combine both outputs and deploy to Netlify as production (only if both build and tests pass)
Concurrency
Only one run at a time. If an earlier deploy is in progress, the later run waits (does not cancel the earlier one).
pr-checks.yml: PR Checks
Runs on every PR created or updated against the main branch.
Job Flow
- Build — Build the Next.js blog (
pnpm build) and Docusaurus doc site (pnpm doc:build) - Preview Deploy — Combine both outputs, deploy a preview to Netlify, and post the preview URL as a PR comment
Concurrency
In-progress runs for the same PR are cancelled when a new run starts (to save resources).
Deploy Target
Deployed to Netlify.
| Environment | Trigger | Deploy Type |
|---|---|---|
| Production | Push to main | netlify deploy --prod |
| Preview | PR create/update | netlify deploy (draft) |
Preview deploy URLs are automatically posted as a comment on the PR.
Build Scope
Both the blog and doc site are built in CI.
| Package | Build Command | Output Directory | Served At |
|---|---|---|---|
Blog (blog/) | pnpm build | blog/out/ | /pj/zpaper/ |
Doc (doc/) | pnpm doc:build | doc/build/ | /pj/zpaper/doc/ |
The deploy step combines both outputs into a single directory structure matching the URL paths, then uploads it to Netlify.
Deploy Directory Structure
The combined output deployed to Netlify looks like this:
deploy/
pj/
zpaper/ ← Blog (Next.js static export)
articles/
tags/
...
doc/ ← Doc site (Docusaurus build)
docs/
...
Netlify Configuration
Build is handled by GitHub Actions, not Netlify. A netlify.toml at the repo root overrides Netlify's UI settings to skip the build step.
Secrets
Secrets used by GitHub Actions. Configured in the GitHub repository under Settings → Secrets.
| Secret | Purpose |
|---|---|
NETLIFY_AUTH_TOKEN | Authentication token for Netlify CLI |
NETLIFY_SITE_ID | Target Netlify site ID |