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

pull/1038/head
Simon Willison 2020-10-18 14:35:26 -07:00 zatwierdzone przez GitHub
rodzic f7147260a4
commit c37a0a93ec
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 14 dodań i 0 usunięć

Wyświetl plik

@ -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