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 hidden or 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 [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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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