Last active
April 8, 2021 13:39
-
-
Save mariovalney/5726aa7be656252e60b75a83e2f606ca to your computer and use it in GitHub Desktop.
Deploying from Bitbucket Pipelines to WP Engine using Gulp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: node:10.9.0 | |
pipelines: | |
custom: | |
production: | |
- step: | |
deployment: production | |
caches: | |
- node | |
script: | |
- echo "Starting build..." | |
# Npm and Gulp | |
- npm ci | |
- npm install gulp-cli -g | |
- gulp | |
# Creating Build | |
- echo "${BITBUCKET_BUILD_NUMBER}" >> .build | |
- cat .gitignore.deploy >> .gitignore | |
- git rm -r --cached . | |
- git add -A | |
- git commit -m "[Build] ${BITBUCKET_BUILD_NUMBER}" | |
# Deploy to WPEngine | |
- echo "Deploying to Production" | |
- git push -f git@git.wpengine.com:production/YOUR_ENVIRONMENT_NAME.git master | |
staging: | |
- step: | |
deployment: staging | |
caches: | |
- node | |
script: | |
- echo "Starting build..." | |
# Npm and Gulp | |
- npm ci | |
- npm install gulp-cli -g | |
- gulp | |
# Creating Build | |
- echo "${BITBUCKET_BUILD_NUMBER}" >> .build | |
- cat .gitignore.deploy >> .gitignore | |
- git rm -r --cached . | |
- git add -A | |
- git commit -m "[Build] ${BITBUCKET_BUILD_NUMBER}" | |
# Deploy to WPEngine | |
- echo "Deploying to Staging" | |
- git push -f git@git.wpengine.com:production/YOUR_ENVIRONMENT_NAME.git master |
Hi.
You just have to put this file in repository (please read Bitbucket Pipeline docs).
But I'm not using this workflow... I replaced it:
https://gist.github.com/mariovalney/f5c48b2d3ca655ca6a4fb298622f08e1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Mario
Is there any chance you could provide a few instructional steps to get this running and could share your gulp config please so I can see how you've set up you file paths?
I have my gulpfile in my theme folder, installed all node modules in there and run the gulp tasks from there as well. I'm just wondering if you have things set up a bit differently as I can't get your pipeline to run successfully.
Any help would be greatly appreciated. Thanks