Skip to content

Instantly share code, notes, and snippets.

@mariovalney
Last active April 8, 2021 13:39
Show Gist options
  • Save mariovalney/5726aa7be656252e60b75a83e2f606ca to your computer and use it in GitHub Desktop.
Save mariovalney/5726aa7be656252e60b75a83e2f606ca to your computer and use it in GitHub Desktop.
Deploying from Bitbucket Pipelines to WP Engine using Gulp
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 [email protected]: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 [email protected]:production/YOUR_ENVIRONMENT_NAME.git master
@mariovalney
Copy link
Author

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