Deploying Bedrock & Sage via DeployHQ

I’m attempting to deploy a Bedrock/Sage site via https://www.deployhq.com/.

I have the whole Bedrock folder in a repo, and my plan is to do this:

  1. Deploy the bedrock folder from the repo
  2. DeployHQ allows me to also deploy config files, so I’ve added an .env file to be deployed along with the repo, with production db credentials, and the WP_ENV environment variable set to production
  3. Run composer install from the server root (DeployHQ runs commands as part of the build pipeline and then uploads the generated files)
  4. Install the Sage theme npm dependencies for Sage by running yarn from the theme root
  5. Install Composer dependencies for Sage by running composer install --no-ansi --no-dev --no-interaction --no-progress --optimize-autoloader --no-scripts from the theme root
  6. Compile assets from production by running yarn build:production from the theme root

Am I approaching this right? Bedrock installs at Step 3 ok, but I get an error at step 4.

[5/5] Building fresh packages...
error /data/web/app/themes/lean/node_modules/node-sass: Command failed.
Exit code: 1

Have I missed something?

Thanks :slight_smile:

2 Likes

Were you able to resolve this?

1 Like

If it helps some1, I’m using this bash script to deploy from a local machine: https://github.com/trainoasis/wp-bedrock-sage-bash-deploy

Or if you prefer Gitlab’s CI version:

1 Like

Hey, I’m also stuck here. Did you get it to work?