Deployment
Build process, deploy workflow, and the staging → production pipeline.
Branch → Environment Mapping
| Branch | Deploys to | Domain |
|---|---|---|
master | Production | whallc.com |
staging | Staging | staging.whallc.com, whallc.joeyyax.dev |
The typical workflow:
- Create a feature branch from
master - Develop and test locally
- Merge to
stagingfor QA - Once verified, merge to
masterfor production
Build Process
The deploy artifact is generated by tools/build-dist.sh. Run it with:
npm run buildWhat it does, step by step:
- Clean — Removes any existing
dist/directory - Sync source files — Rsyncs
src/→dist/, which flattens the structure:src/wp-content/→dist/wp-content/src/wp-config.php→dist/wp-config.phpsrc/nginx.conf→dist/nginx.conf- Excludes
.git,.DS_Store, anduploads/
- Copy front controller — Copies
index.phpandwp-cli.ymltodist/ - Rewrite Composer paths — Rewrites
composer.jsoninstaller-paths fromsrc/wp-content/towp-content/(the deploy layout is flat, nosrc/prefix) - Install dependencies — Runs
composer install --no-dev --optimize-autoloaderindist/:- 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/
- Installs WordPress core into
- 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 productionThis 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 stagingDeploying to Production
git checkout master
git merge staging
git push origin masterOn push, Heroku builds the Docker image from the Dockerfile and redeploys. See Hosting for platform details, environment variables, and the production container architecture.