Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,25 @@ Required in `.env.local` (Next.js) or `.env` (Docker Compose):

## Deployment

Deploys to production via GitHub Actions (SSH tar + scp). Automatic on new release; otherwise trigger manually:
Deploys via GitHub Actions (`deploy.yml`, SSH tar + scp). A published GitHub **release** always deploys to **production**. A manual `workflow_dispatch` takes an `environment` input (`production` or `staging`) that **defaults to `staging`**.

**The target controls what ships:**

- **`production`** β€” ships **both** the Next.js frontend **and** the WordPress backend (theme + plugin tarballs, plugin activation, OPcache flush). Use this for any change under `wordpress/themes/**` or `wordpress/plugins/**` β€” `functions.php`, REST handlers/routes, CPT/ACF registration, etc.
- **`staging`** β€” ships **only** the Next.js frontend. All WordPress theme/plugin steps are gated on `env.ENVIRONMENT == 'production'` and are **skipped** on staging (staging shares the production WP backend, so it must never push theme/plugin from a staging deploy).

> ⚠️ A bare `gh workflow run deploy.yml` runs as **staging**, so backend changes are **not** deployed β€” yet the run still succeeds (the frontend ships and smoke tests pass). Symptom: a new `cdcf/v1` route 404s or theme behaviour is unchanged after a "green" deploy. Always pass `-f environment=production` for backend changes.

```bash
gh workflow run deploy.yml # after pushing to main
# Deploy frontend + backend (theme/plugin changes) β€” after pushing to main:
gh workflow run deploy.yml -f environment=production

# Deploy frontend only (Next.js):
gh workflow run deploy.yml -f environment=staging # or just: gh workflow run deploy.yml

# Confirm the WP theme/plugin steps actually ran (must be `success`, not `skipped`):
gh run view <run-id> --json jobs \
-q '.jobs[].steps[] | select(.name|test("WP theme|OPcache|plugins")) | "\(.conclusion)\t\(.name)"'
```

The scp upload step occasionally fails transiently with `kex_exchange_identification: read: Connection reset by peer` (VPS SSH rate-limit after back-to-back deploys) β€” just re-run.
Comment on lines +256 to +277
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | πŸ”΄ Critical | ⚑ Quick win

Fix Prettier formatting issues.

The CI pipeline detected code style issues. Run the following command to fix them:

prettier --write AGENTS.md
🧰 Tools
πŸͺ› LanguageTool

[uncategorized] ~260-~260: The official name of this content management system is spelled with a capital β€œP”.
Context: ...e flush). Use this for any change under wordpress/themes/** or wordpress/plugins/** β€” ...

(WORDPRESS)

πŸ€– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` around lines 256 - 277, Run Prettier to fix the formatting errors
in AGENTS.md by reformatting the file; specifically run the repository's
prettier formatter (e.g., prettier --write AGENTS.md) so the "Deploys via GitHub
Actions" section, code blocks (bash examples), bullet lists, and inline emphasis
match the project's style rules and CI will pass.

Loading