Created
October 5, 2018 09:11
-
-
Save mihaiserban/73a6a80256182f76f8c3ec5d07d7fcb4 to your computer and use it in GitHub Desktop.
Auto deployment to now.sh from Circle CI
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
machine: | |
node: | |
version: 8 | |
deployment: | |
staging: | |
branch: master | |
owner: my-company | |
commands: | |
- ./deploy-staging.sh | |
production: | |
tag: /v[0-9]+(\.[0-9]+)+/ | |
owner: my-company | |
commands: | |
- ./deploy-production.sh |
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
#!/usr/bin/env sh | |
set -eu; | |
npm install --global now@9 [email protected]; | |
URL="$(now deploy --env=DB_PASSWORD=@production-db-password --team=my-team --token=$ZEIT_TOKEN)"; | |
await-url "$URL"; | |
now alias set "$URL" my-app.com --team=my-team --token=$ZEIT_TOKEN; | |
now remove my-app --yes --safe --team=my-team --token=$ZEIT_TOKEN; |
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
#!/usr/bin/env sh | |
set -eu; | |
npm install --global now@9 [email protected]; | |
URL="$(now deploy --env=DB_PASSWORD=@staging-db-password --team=my-team --token=$ZEIT_TOKEN)"; | |
await-url "$URL"; | |
now alias set "$URL" staging.my-app.com --team=my-team --token=$ZEIT_TOKEN; | |
now remove my-app --yes --safe --team=my-team --token=$ZEIT_TOKEN; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment