A wercker step to deploy to a certain git branch in a repo. Supports also Github Pages.
You either have to define a gh_token if you deploy to github or a host if you want to deploy via SSH.
(Please use wercker steps leipert/add-ssh-key-gh-bb and add-to-known_hosts to setup your SSH token for github and bitbucket)
gh_tokenoptional Github API access token, if you want to deploy to github. (documentation). don't share this on a public repo, use an environment variable!hostoptional Set this to a host like "example.org". Defaults to your build host or github ifgh_tokenis used.useroptional Set this to the ssh user of your git instance. Defaults to git.repooptional Set this to a repo like "username/repo". Defaults to your build repo.branchoptional If set this branch will be used as deploy goal. Defaults to build masterbasediroptional Set this if your build step outputs to a folderdestdiroptional Speficies the directory in the remote repo to copy the files todiscard_historyDANGER optional Discards history of that branch. Use with care as it could destroy your whole programming history.gh_pagesoptional Set this to true if you want to deploy to Github Pages. The Branch will be set accordingly.gh_pages_domainoptional Custom domain (documentation)tagoptional Adds a tag to the pushed commit. Valid options are bower, node or any string.tag_overwriteoptional If set, tags will be overwritten
For Github Pages:
deploy:
steps:
- git-push:
gh_token: $GIT_TOKEN
gh_pages: true
gh_pages_domain: example.org
basedir: build
Deploy with SSH
deploy:
steps:
# Add SSH-Key to
- leipert/add-ssh-key-gh-bb:
keyname: DEPLOY_SSH
# Add bitbucket to known hosts, so they won't ask us whether we trust bitbucket
- add-to-known_hosts:
hostname: bitbucket.org
fingerprint: 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40
- git-push:
host: bitbucket.org
repo: example/exampleRepo
branch: example
basedir: build