Created
August 5, 2015 07:52
-
-
Save atrakeur/ddf1b9ebff20f1b90104 to your computer and use it in GitHub Desktop.
Wercker deploy phpunit coverage and phpdoc to a git repo (github webpages for example)
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
deploy: | |
steps: | |
# Add SSH-Key to current box | |
# You have to generate an ssh key in wercker, add it to your github/bitbucket accoung | |
# Then you have to add the ssh key to your env vars in wercker | |
- leipert/add-ssh-key-gh-bb: | |
keyname: deploy_ssh | |
# Add bitbucket to known hosts, so they won't ask us whether we trust bitbucket (change this if using github) | |
# on your local machine use ssh-keyscan github.com >> thefingerprint to get it | |
- add-to-known_hosts: | |
hostname: bitbucket.org | |
fingerprint: 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40 | |
# Prepare some git vars and clone the git repo current state | |
- script: | |
name: Preparing export upload | |
code: |- | |
git config --global user.email "wercker@yourdomain.com" | |
git config --global user.name "Wercker documentation deploy" | |
mkdir export | |
git clone YOURREPO export | |
# Run various scripts that generate some things | |
- script: | |
name: Generating documentation | |
code: |- | |
phpdoc -d app -t export/documentation --template="responsive-twig" | |
- script: | |
name: Generating coverage | |
code: |- | |
phpunit --coverage-html export/coverage | |
# Commit and push the generated documentation to your repo | |
- script: | |
name: Uploading export | |
code: |- | |
cd export | |
git add -vA | |
git commit -vm "Wercker battleflight doc update" | |
git push origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment