Created
August 9, 2017 05:46
-
-
Save evenchange4/e2bd5f055c4b91071ab3ce19fd0e7e5d to your computer and use it in GitHub Desktop.
Auto deployment to now.sh in 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: 7 | |
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@7 [email protected]; | |
now switch my-company -t $ZEIT_TOKEN; | |
URL="$(now deploy -t $ZEIT_TOKEN -e DB_PASSWORD=@production-db-password)"; | |
await-url "$URL" && now alias set "$URL" my-app.com -t $ZEIT_TOKEN; | |
now remove my-app --yes --safe -t $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@7 [email protected]; | |
now switch my-company -t $ZEIT_TOKEN; | |
URL="$(now deploy -t $ZEIT_TOKEN -e DB_PASSWORD=@staging-db-password)"; | |
await-url "$URL" && now alias set "$URL" staging.my-app.com -t $ZEIT_TOKEN; | |
now remove my-app --yes --safe -t $ZEIT_TOKEN; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment