Last active
December 28, 2015 04:08
-
-
Save collin/7439713 to your computer and use it in GitHub Desktop.
All this assumes the wercker scripts execute in a directory that contains a divshot.json file and the static files for your app. Would be necessary to copy the token from ~/.divshot/config/user.json
This file contains hidden or 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
box: wercker/nodejs | |
# Build definition | |
build: | |
# The steps that will be executed on build | |
steps: | |
# A step that executes `npm install` command | |
- npm-install | |
# A step that executes `npm test` command | |
- npm-test | |
# A custom script step, name value is used in the UI | |
# and the code value contains the command that get executed | |
- script: | |
name: deploy to divshot.io staging | |
code: | | |
npm install -g divshot-cli && divshot push staging --token <token from ~/.divshot/config/user.json> |
Hey guys, thanks :D I've taken this and added it as a guide in our documentation.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks good, I think it is good to move this into a deploy. That way you can more easily rollback deploys and deploy builds to different targets.
In this example the deploy target name is used as the
target name
for divshot. It also assumes you have created an environment variable namedDIVSHOT_TOKEN
with your api token.