mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Deploy latest.datasette.io on commit to master - #313
If the tests pass in Travis CI, deploy an instance containing Datasette's test fixtures to https://latest.datasette.io/ Also set up an alias of truncated-commit-hash.datasette.io
This commit is contained in:
parent
db1e6bc182
commit
f0c17229b7
1 changed files with 19 additions and 1 deletions
20
.travis.yml
20
.travis.yml
|
|
@ -1,8 +1,26 @@
|
||||||
language: python
|
language: python
|
||||||
|
|
||||||
|
# 3.6 is listed first so it gets used for the later build stages
|
||||||
python:
|
python:
|
||||||
- 3.5
|
|
||||||
- 3.6
|
- 3.6
|
||||||
|
- 3.5
|
||||||
|
|
||||||
|
# Executed for 3.5 AND 3.5 as the first "test" stage:
|
||||||
script:
|
script:
|
||||||
- python setup.py test
|
- python setup.py test
|
||||||
|
|
||||||
|
# This defines further stages that execute after the tests
|
||||||
|
jobs:
|
||||||
|
include:
|
||||||
|
- stage: deploy latest.datasette.io
|
||||||
|
script:
|
||||||
|
- pip install .
|
||||||
|
- npm install -g now
|
||||||
|
- python tests/fixtures.py fixtures.db fixtures.json
|
||||||
|
- echo '{"name":"datasette-latest","alias":"latest.datasette.io"}' > now.json
|
||||||
|
- datasette publish now fixtures.db -m fixtures.json --token=$NOW_TOKEN --branch=$TRAVIS_COMMIT --version-note=$TRAVIS_COMMIT
|
||||||
|
- now alias --token=$NOW_TOKEN
|
||||||
|
- export ALIAS=`echo $TRAVIS_COMMIT | cut -c 1-7`
|
||||||
|
- echo "{\"name\":\"datasette-latest\",\"alias\":\"$ALIAS.datasette.io\"}" > now.json
|
||||||
|
- now alias --token=$NOW_TOKEN
|
||||||
|
on: master
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue