Created
June 12, 2014 21:57
-
-
Save gcpantazis/d7db6cda8b582763403d to your computer and use it in GitHub Desktop.
Drone setup for deploying every branch to Dokku
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
#!/bin/bash | |
if [ $DRONE_BRANCH ]; then | |
git fetch --unshallow | |
git remote remove dokku | |
git remote add dokku [email protected]:project-bar-$DRONE_BRANCH | |
git push dokku $DRONE_BRANCH:master | |
fi |
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: phusion/passenger-full | |
script: | |
- sudo apt-get update | |
- gem install sass | |
- npm config set loglevel warn | |
- npm install -g grunt-cli | |
- npm install | |
- npm test | |
deploy: | |
bash: | |
command: './deploy' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
git fetch --unshallow
is necessary, as the first push to a new feature branch will attempt to push to an empty repo on dokku. Subsequently it isn't necessary, so you could theoretically improve this by checking the dokku remote before fetching.