Skip to content

Deployment

Deployments are handled via GitHub Actions using the shared reusable workflow from subscribed-aps/workflows.

Workflow

The deployment workflow is defined in .github/workflows/deploy-bedrock.yml.

Deployments are manually triggered via workflow_dispatch from the GitHub Actions UI. You select the target branch/environment before running.

Environment Branch Description
develop develop Staging / QA environment
master master Production

How it works

  1. The workflow calls the shared deploy-bedrock.yml reusable workflow from subscribed-aps/workflows.
  2. The shared workflow handles SSH access, Composer installs, symlinking releases, and running WP-CLI migrations.
  3. Releases are stored under system/releases/ on the server. The deployment script submodule at devops/deployment-script provides the server-side logic.
  4. Shared persistent directories (web/app/uploads, web/app/languages) are symlinked from a shared location on the server rather than being included in each release.

Triggering a deployment

  1. Go to ActionsDeploy Bedrock in the GitHub repository.
  2. Click Run workflow.
  3. Select the target environment (develop or master).
  4. Click Run workflow.

Required secrets

The following secrets must be set in the GitHub repository settings:

Secret Description
SSH_PRIVATE_KEY SSH key with access to the production server
KNOWN_HOSTS SSH known_hosts entry for the server
Any secrets consumed by the shared workflow See subscribed-aps/workflows for the full list

Release structure on the server

/var/www/<project>/
├── current -> releases/<timestamp>/   # Symlink to active release
├── releases/
│   ├── 20250702-151830-15dbf32/
│   └── ...                            # Last 3 releases kept
└── shared/
    ├── .env
    ├── web/app/uploads/
    └── web/app/languages/