mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Ability to deploy demos of branches
* Ability to deploy additional branch demos, closes #1442 * Only run tests before deploy on main branch * Documentation for continuous deployment
This commit is contained in:
parent
adb5b70de5
commit
d84e574e59
2 changed files with 18 additions and 1 deletions
8
.github/workflows/deploy-latest.yml
vendored
8
.github/workflows/deploy-latest.yml
vendored
|
|
@ -29,6 +29,7 @@ jobs:
|
|||
python -m pip install -e .[docs]
|
||||
python -m pip install sphinx-to-sqlite==0.1a1
|
||||
- name: Run tests
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
run: |
|
||||
pytest -n auto -m "not serial"
|
||||
pytest -m "serial"
|
||||
|
|
@ -50,6 +51,8 @@ jobs:
|
|||
run: |-
|
||||
gcloud config set run/region us-central1
|
||||
gcloud config set project datasette-222320
|
||||
export SUFFIX="-${GITHUB_REF#refs/heads/}"
|
||||
export SUFFIX=${SUFFIX#-main}
|
||||
datasette publish cloudrun fixtures.db extra_database.db \
|
||||
-m fixtures.json \
|
||||
--plugins-dir=plugins \
|
||||
|
|
@ -57,7 +60,10 @@ jobs:
|
|||
--version-note=$GITHUB_SHA \
|
||||
--extra-options="--setting template_debug 1 --setting trace_debug 1 --crossdb" \
|
||||
--install=pysqlite3-binary \
|
||||
--service=datasette-latest
|
||||
--service "datasette-latest$SUFFIX"
|
||||
- name: Deploy to docs as well (only for main)
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
run: |-
|
||||
# Deploy docs.db to a different service
|
||||
datasette publish cloudrun docs.db \
|
||||
--branch=$GITHUB_SHA \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue