WHA Docs

Deployment

Build process, deploy workflow, and the staging → production pipeline.

Branch → Environment Mapping

BranchDeploys toDomain
masterProductionwhallc.com
stagingStagingstaging.whallc.com, whallc.joeyyax.dev

The typical workflow:

  1. Create a feature branch from master
  2. Develop and test locally
  3. Merge to staging for QA
  4. Once verified, merge to master for production

Build Process

The deploy artifact is generated by tools/build-dist.sh. Run it with:

npm run build

What it does, step by step:

  1. Clean — Removes any existing dist/ directory
  2. Sync source files — Rsyncs src/dist/, which flattens the structure:
    • src/wp-content/dist/wp-content/
    • src/wp-config.phpdist/wp-config.php
    • src/nginx.confdist/nginx.conf
    • Excludes .git, .DS_Store, and uploads/
  3. Copy front controller — Copies index.php and wp-cli.yml to dist/
  4. Rewrite Composer paths — Rewrites composer.json installer-paths from src/wp-content/ to wp-content/ (the deploy layout is flat, no src/ prefix)
  5. Install dependencies — Runs composer install --no-dev --optimize-autoloader in dist/:
    • Installs WordPress core into dist/wp/
    • Installs Composer-managed plugins into dist/wp-content/plugins/
    • Installs yax mu-plugins into dist/wp-content/mu-plugins/
    • Generates optimized autoloader in dist/vendor/
  6. Security hardening — Strips info-disclosure files (readme.html, license.txt, etc.)

The result: dist/ is a complete, self-contained WordPress installation pinned by composer.lock.

Theme Assets

Before deploying, build theme assets for production:

cd src/wp-content/themes/wha2025
npm run production

This generates versioned assets in assets/dist/ with content-hash cache busting. The built assets are tracked in git — commit them before pushing.

Deploying to Staging

git checkout staging
git merge feature/your-branch
git push origin staging

Deploying to Production

git checkout master
git merge staging
git push origin master

On push, Heroku builds the Docker image from the Dockerfile and redeploys. See Hosting for platform details, environment variables, and the production container architecture.

On this page