Build and deploy docs.db to datasette-docs-latest

This commit is contained in:
Simon Willison 2020-10-18 14:35:26 -07:00 committed by GitHub
commit c37a0a93ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,10 +26,18 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install -e .[test]
python -m pip install -e .[docs]
python -m pip install sphinx-to-sqlite
- name: Run tests
run: pytest
- name: Build fixtures.db
run: python tests/fixtures.py fixtures.db fixtures.json
- name: Build docs.db
run: |-
cd docs
sphinx-build -b xml . _build
sphinx-to-sqlite ../docs.db _build
cd ..
- name: Set up Cloud Run
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
@ -46,3 +54,9 @@ jobs:
--version-note=$GITHUB_SHA \
--extra-options="--config template_debug:1" \
--service=datasette-latest
# Deploy docs.db to a different service
datasette publish cloudrun docs.db \
--branch=$GITHUB_SHA \
--version-note=$GITHUB_SHA \
--extra-options="--config template_debug:1" \
--service=datasette-docs-latest