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> |
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.
# Add this to your wercker.yml below your builds and build steps
deploy:
# The steps that will be executed on build
steps:
- script:
name: deploy to divshot.io staging
code: |
npm install -g divshot-cli
divshot push $WERCKER_DEPLOYTARGET_NAME --token $DIVSHOT_TOKEN
In this example the deploy target name is used as the target name
for divshot. It also assumes you have created an environment variable named DIVSHOT_TOKEN
with your api token.
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
I think that generally works, though Wercker has some places in the app to store deploy variables like target (e.g.
staging
and the super secret key. I'll test it out and let you know if I run into issues.Thanks for all the help. Super stoked for divshot.io.