Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bhubbard/79855789f836cc6f235a454ef795ec59 to your computer and use it in GitHub Desktop.
Save bhubbard/79855789f836cc6f235a454ef795ec59 to your computer and use it in GitHub Desktop.
Codeship Custom Deploy Script for WPEngine
# You must set up two environment variables:
# repoSlug = slug for WP Engine repository
# themeDir = path from the top of the repository, to the theme directory
git remote add production [email protected]:production/${repoSlug}.git
git remote add staging [email protected]:staging/${repoSlug}.git
cd ${themeDir}
npm install
npm install -g bower
bower install
gulp build
git config --global user.email "[email protected]"
git config --global user.name "Codeship Deploy Bot"
git config push.default current
git checkout -b deploy
git add public
git commit -m "DEPLOYMENT - public folder build"
git push -f staging deploy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment