Skip to content

Instantly share code, notes, and snippets.

@urre
Last active August 20, 2018 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save urre/13e4c9a724fc7c33ec24a22741dc085f to your computer and use it in GitHub Desktop.
Save urre/13e4c9a724fc7c33ec24a22741dc085f to your computer and use it in GitHub Desktop.
Example, Bedrock on Codeship

1. Initial setup

  • 1.1 First setup the ENV variables under Environment
  • 1.2 Authorize the project specific Codeship ssh key on the server. (under General)

2. Setup tab

phpenv local 7.2
cd ~/clone/src
composer install --prefer-dist  --no-interaction

3. Test tab

composer test

4. Build and deploy

# Build assets, create fingerprinted assets
nvm install 10.9.0
nvm use 10.9.0
cd ~/clone/src/web/app/themes/exampletheme
npm install
npm run build
npm run rev
# Deploy
rsync -av -e 'ssh -p 22' --delete --progress --exclude '.git' ~/clone/src/config/ $CI_USER@$CI_HOST:$CI_CONFIGPATH
rsync -av -e 'ssh -p 22' --delete --progress --exclude '.git' ~/clone/src/vendor/ $CI_USER@$CI_HOST:$CI_VENDORPATH
rsync -av -e 'ssh -p 22' --delete --progress --exclude '.git' ~/clone/src/web/wp/ $CI_USER@$CI_HOST:$CI_WPPATH
rsync -avz --delete --progress --exclude '.git' --exclude 'node_modules' --exclude 'uploads' ~/clone/src/web/app/ $CI_USER@$CI_HOST:$CI_APPPATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment