chore(travis): use travis to deploy to production (#631)

This commit is contained in:
Nolan Lawson 2018-11-11 13:01:32 -08:00 committed by GitHub
parent ae6ae34b7d
commit dd824822cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -56,9 +56,9 @@ matrix:
include: include:
- env: BROWSER=chrome:headless COMMAND=test-browser-suite0 - env: BROWSER=chrome:headless COMMAND=test-browser-suite0
- env: BROWSER=chrome:headless COMMAND=test-browser-suite1 - env: BROWSER=chrome:headless COMMAND=test-browser-suite1
- env: COMMAND=deploy-dev-travis - env: COMMAND=deploy-all-travis
allow_failures: allow_failures:
- env: COMMAND=deploy-dev-travis - env: COMMAND=deploy-all-travis
branches: branches:
only: only:
- master - master

View File

@ -37,13 +37,16 @@
"launch": "now -e SAPPER_TIMESTAMP=$(date +%s%3N) --team nolanlawson && sleep 60", "launch": "now -e SAPPER_TIMESTAMP=$(date +%s%3N) --team nolanlawson && sleep 60",
"launch-travis": "now -e SAPPER_TIMESTAMP=$(date +%s%3N) --team nolanlawson --token $NOW_TOKEN && sleep 60", "launch-travis": "now -e SAPPER_TIMESTAMP=$(date +%s%3N) --team nolanlawson --token $NOW_TOKEN && sleep 60",
"alias-prod": "now alias pinafore.social --team nolanlawson", "alias-prod": "now alias pinafore.social --team nolanlawson",
"alias-prod-travis": "now alias pinafore.social --team nolanlawson --token $NOW_TOKEN",
"alias-dev": "now alias dev.pinafore.social --team nolanlawson", "alias-dev": "now alias dev.pinafore.social --team nolanlawson",
"alias-dev-travis": "now alias dev.pinafore.social --team nolanlawson --token $NOW_TOKEN", "alias-dev-travis": "now alias dev.pinafore.social --team nolanlawson --token $NOW_TOKEN",
"cleanup": "now rm pinafore --safe --yes --team nolanlawson", "cleanup": "now rm pinafore --safe --yes --team nolanlawson",
"cleanup-travis": "now rm pinafore --safe --yes --team nolanlawson --token $NOW_TOKEN", "cleanup-travis": "now rm pinafore --safe --yes --team nolanlawson --token $NOW_TOKEN",
"deploy-prod": "run-s stage-prod launch alias-prod cleanup", "deploy-prod": "run-s stage-prod launch alias-prod cleanup",
"deploy-dev": "run-s stage-dev launch alias-dev cleanup", "deploy-dev": "run-s stage-dev launch alias-dev cleanup",
"deploy-dev-travis": "if [ $TRAVIS_BRANCH = master -a $TRAVIS_PULL_REQUEST = false ]; then run-s stage-dev launch-travis alias-dev-travis cleanup-travis; fi", "deploy-dev-travis": "run-s stage-dev launch-travis alias-dev-travis cleanup-travis; fi",
"deploy-prod-travis": "if echo $TRAVIS_COMMIT_MESSAGE | grep -q -E '\\d+\\.\\d+\\.\\d+'; then run-s stage-prod launch-travis alias-prod-travis cleanup-travis; fi",
"deploy-all-travis": "if [ $TRAVIS_BRANCH = master -a $TRAVIS_PULL_REQUEST = false ]; then run-s deploy-dev-travis deploy-prod-travis; fi",
"backup-mastodon-data": "PGPASSWORD=pinafore pg_dump -U pinafore -w pinafore_development > fixtures/dump.sql && cd mastodon/public/system && tar -czf ../../../fixtures/system.tgz ." "backup-mastodon-data": "PGPASSWORD=pinafore pg_dump -U pinafore -w pinafore_development > fixtures/dump.sql && cd mastodon/public/system && tar -czf ../../../fixtures/system.tgz ."
}, },
"dependencies": { "dependencies": {