deploy to dev.pinafore.social using travis

This commit is contained in:
Nolan Lawson 2018-04-11 22:02:47 -07:00
parent e9b6f69f8c
commit 3fc42bdd4d
3 changed files with 17 additions and 5 deletions

View File

@ -52,14 +52,16 @@ before_install:
- ffmpeg -version - ffmpeg -version
before_script: before_script:
- npm run lint - npm run lint
script: npm run test-browser script: npm run $COMMAND
env: env:
global: global:
- PGPORT=5433 - PGPORT=5433
- secure: iR11lD+OAyTJdNoK67esDOrd34HKQboJo0DrVL4xqwoAwQGmNX7posBtcj0TOwVAdHfd5S80xlhWlMebrtHWR9oMtdcBXusWnehZVRB0WE89n8enkJCbAxn5uMpcEpKpDHTcfR/Gbxf2sw15dTy0PrW/ldiZXWf7wybJEBGbrEP7QI8oy3VHzmKpSyjRpN/hnSlgxskVnfIMKPp43D+705Ka7aMJNTWZ5dAdKdIjQWX6j6jlqx6Vl+qIq7td3DTZA9A5ft8HxaWC27F1bbd52PdRY2h8Ii3Ps+n8Q8uZK1KJPp9t3pPk+PmYINu2715ArukRk73kahnFadBQLhytn95FLiyKOLj+ajBNo+o3KIQDs3qRj8gkXpkJpuLAPgwABOEVWuLh9y+oa33IDYVzyESRVtXqbbwgziYVjNQCozP1Nt9+Wyh4YHfdOjEEMdlVlkwlyzPfaLAqVBusEphnaF/vx7itdVvxOMQYNcSRoBrAgciN4ng0GZHi5P85DMXnNV41r+d3JK5JEYZD/gpSja5cPUlpPlkXsKiElG3fEoO2D/Uc8rR9Cu84XiJiJQjP91QuWagfdhgqM4YOndt2YukiGzRzDMjTx1BzSW4S11RQGWzZrv06zmDLXTlnUAMEm1/Exo4L6VfgRvyFmgM0LAT+IceVEHbOKC/Hnd8Y3mo=
matrix: matrix:
include: include:
- env: BROWSER=chrome:headless - env: BROWSER=chrome:headless COMMAND=test-browser
- env: BROWSER=firefox:headless - env: BROWSER=firefox:headless COMMAND=test-browser
- env: COMMAND=deploy-dev
allow_failures: allow_failures:
- env: BROWSER=firefox:headless - env: BROWSER=firefox:headless
branches: branches:

9
package-lock.json generated
View File

@ -4650,6 +4650,15 @@
} }
} }
}, },
"git-branch-is": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/git-branch-is/-/git-branch-is-0.1.0.tgz",
"integrity": "sha1-vvWmETow9AB+fAAvm6TPN5JcFx8=",
"dev": true,
"requires": {
"commander": "2.12.2"
}
},
"glob": { "glob": {
"version": "7.1.2", "version": "7.1.2",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",

View File

@ -24,9 +24,9 @@
"globalize-css": "node ./bin/globalize-css.js", "globalize-css": "node ./bin/globalize-css.js",
"deglobalize-css": "node ./bin/globalize-css.js --reverse", "deglobalize-css": "node ./bin/globalize-css.js --reverse",
"stage-dev": "printf 'User-agent: *\nDisallow: /' > assets/robots.txt", "stage-dev": "printf 'User-agent: *\nDisallow: /' > assets/robots.txt",
"deploy-dev": "npm run stage-dev && now && sleep 60 && now alias dev.pinafore.social && now rm pinafore --safe --yes", "deploy-dev": "git-branch-is master && npm run stage-dev && now && sleep 60 && now alias dev.pinafore.social && now rm pinafore --safe --yes",
"stage-prod": "rm -f assets/robots.txt", "stage-prod": "rm -f assets/robots.txt",
"deploy-prod": "npm run stage-prod && now && sleep 60 && now alias pinafore.social && now rm pinafore --safe --yes", "deploy-prod": "git-branch-is master && npm run stage-prod && now && sleep 60 && now alias pinafore.social && now rm pinafore --safe --yes",
"backup-mastodon-data": "pg_dump -Fc mastodon_development > fixtures/dump.sql && cd mastodon/public/system && tar -czf ../../../fixtures/system.tgz ." "backup-mastodon-data": "pg_dump -Fc mastodon_development > fixtures/dump.sql && cd mastodon/public/system && tar -czf ../../../fixtures/system.tgz ."
}, },
"dependencies": { "dependencies": {
@ -79,6 +79,7 @@
"yargs": "^10.1.1" "yargs": "^10.1.1"
}, },
"devDependencies": { "devDependencies": {
"git-branch-is": "^0.1.0",
"now": "^10.2.2", "now": "^10.2.2",
"standard": "^10.0.3", "standard": "^10.0.3",
"testcafe": "^0.19.0" "testcafe": "^0.19.0"