Deployments
The website deploys from GitHub Actions. CI builds frontend assets, packages a release, uploads it over SSH, and flips a current symlink on the server.
The server does not build frontend assets and does not run Strapi migration commands during deploy.
Website Deploy Model
Section titled “Website Deploy Model”The reusable deploy workflow is .github/workflows/deploy.yml.
Environment-specific workflows call it:
.github/workflows/deploy-staging.yml.github/workflows/deploy-production.yml
The deploy workflow:
- Checks out the repository.
- Installs pnpm dependencies with the committed lockfile.
- Runs
pnpm run build. - Creates a release artifact without
.git,.github,.claude,.env,node_modules,vendor, orstorage. - Uploads the artifact over SSH.
- Runs
scripts/deploy.shon the server.
Release Layout
Section titled “Release Layout”Each website environment uses this shape:
<DEPLOY_PATH>/├── current -> releases/<release>├── incoming/├── releases/└── shared/ ├── .env ├── public-assets/ ├── storage/ └── users/The web server document root points at:
<DEPLOY_PATH>/current/publicshared/.env, shared/storage/, shared/public-assets/, and shared/users/ survive release changes. Runtime Statamic CP user accounts live in shared/users/; role and group definitions remain versioned in Git.
Server-Side Deploy Steps
Section titled “Server-Side Deploy Steps”scripts/deploy.sh prepares the release and runs:
composer install --no-dev --optimize-autoloader --no-interaction --prefer-distphp artisan optimize:clearphp artisan migrate --forcephp artisan storage:link --forcephp artisan statamic:stache:refreshphp artisan config:cachephp artisan route:cachephp artisan view:cachephp artisan queue:restartIf DEPLOY_WARM_STATIC_CACHE is truthy, it also runs:
php please static:warmThe deploy script does not run frontend builds or Strapi migration commands on the server.
Required GitHub Environments
Section titled “Required GitHub Environments”The application deploy uses two GitHub Environments:
stagingproduction
Required secrets:
DEPLOY_HOSTDEPLOY_PORTDEPLOY_USERDEPLOY_PATHDEPLOY_SSH_PRIVATE_KEYDEPLOY_KNOWN_HOSTS
Optional environment variables:
DEPLOY_KEEP_RELEASESDEPLOY_WARM_STATIC_CACHE
Do not publish secret values, private server paths, or raw host fingerprints in the public docs.
Docs Site Deploy
Section titled “Docs Site Deploy”The docs site has a separate workflow at .github/workflows/deploy-docs.yml. It builds Astro Starlight from docs/, packages docs/dist/, uploads static files over SSH, and flips the docs current symlink.
The docs workflow can run on pushes that affect:
docs/**pnpm-lock.yamlpnpm-workspace.yaml.github/workflows/deploy-docs.yml
It can also be run manually from GitHub Actions.
Required docs environment secrets:
DEPLOY_HOSTDEPLOY_PORTDEPLOY_USERDEPLOY_DOCS_PATHDEPLOY_SSH_PRIVATE_KEYDEPLOY_KNOWN_HOSTS
The docs server layout is:
<DEPLOY_DOCS_PATH>/├── current -> releases/<release>├── incoming/└── releases/The docs.jglp.ch document root points at:
<DEPLOY_DOCS_PATH>/currentThe docs vhost is static-only. It does not need PHP.
Rollback
Section titled “Rollback”Rollback is a symlink operation to a previous release. Use it when the current release is broken and a known-good release still exists under releases/.
High-level procedure:
- Identify the previous known-good release directory.
- Repoint
currentto that release. - Restart queue workers for the website.
- Clear or warm caches if the rollback changes rendered content or compiled Laravel cache.
- Record what was rolled back and why in the private incident notes.
Keep exact server commands and incident-specific details in code-docs/ or the incident record.