Deployment¶
Deployments are handled by GitHub Actions via a shared reusable workflow in subscribed-aps/workflows.
Workflow¶
File: .github/workflows/deploy-bedrock.yml
Triggered manually via workflow_dispatch with a required environment input (develop or master). It delegates to the shared workflow:
To trigger a deployment, go to Actions → Deploy Bedrock → Run workflow and select the target environment.
Environments¶
| Environment | Branch | Server path |
|---|---|---|
develop | develop | /usr/share/wordpress.staging/barberklingen.se/deployments |
master | master | /usr/share/wordpress.barberklingen.se/deployments |
Deployment script¶
The actual deployment logic lives in the devops/deployment-script submodule (bedrock-deployment-script). The shared workflow checks out the repo on the server and runs this script, which:
- Checks out the target branch into a new timestamped release directory under
system/releases/ - Runs
composer install - Symlinks the new release to
current - Runs WP-CLI migrations (
wp barberklingen database migrate) - Prunes old releases (keeps the last 3)
Required secrets¶
The following secrets must be set in the GitHub repository settings:
| Secret | Purpose |
|---|---|
HANDBOOK_DISPATCH_TOKEN | Used by the handbook notification workflow |
| (deploy secrets) | Defined by the shared workflow in subscribed-aps/workflows |
Dotenv Vault¶
Production environment variables are encrypted via dotenv-vault. The DOTENV_KEY secret is injected at runtime. The .env.vault file is committed to the repository and decrypted on the server using the key.
Legacy: Bitbucket Pipelines¶
bitbucket-pipelines.yml still exists and imports from bitbucket-master-pipe. This is superseded by the GitHub Actions workflow and can be considered deprecated.