Skip to content

Deployment

CI/CD — Bitbucket Pipelines

Automated deployments are triggered via Bitbucket Pipelines (bitbucket-pipelines.yml at repo root). It imports a shared reusable pipeline:

Branch Pipeline Target
develop deploy-develop Staging
master deploy-master Production

Pipelines run on push to the respective branch. No manual action needed for routine deploys.

Manual deploy — GitHub Actions

A manual workflow is available at .github/workflows/deploy-bedrock.yml. Trigger it from the GitHub Actions UI:

  1. Go to Actions → Deploy Bedrock
  2. Click Run workflow
  3. Select develop (staging) or master (production)

This calls the shared reusable workflow at subscribed-aps/workflows.

What gets deployed

The deploy process: 1. Checks out the repo on the target server into a timestamped release directory under system/releases/ 2. Runs composer install (no dev dependencies) 3. Symlinks shared files (.env) and directories (web/app/uploads, web/app/languages, web/app/cache, web/app/wp-rocket-config) 4. Atomically switches the current symlink to the new release 5. Runs post-deploy WP-CLI commands (wp core update-db, wp barberklingen database migrate) 6. Cleans up old releases (3 kept)

Environment secrets

Production and staging secrets are stored encrypted in site/.env.vault. The DOTENV_KEY for each environment must be set as a server-side environment variable (or CI secret) for decryption to work at runtime.

See environment-configuration.md for details on how .env.vault works.

Sentry release tracking

On production deploys, a Sentry release is created automatically via the deploy pipeline, linking the deploy to the Git commit SHA in the barberklingen-aps / barberlingen-dk Sentry project.