mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Deploy stable-docs.datasette.io on publish
Refs https://github.com/simonw/datasette.io/issues/67
This commit is contained in:
parent
a6c55afe8c
commit
7bc85b26d6
1 changed files with 42 additions and 0 deletions
42
.github/workflows/publish.yml
vendored
42
.github/workflows/publish.yml
vendored
|
|
@ -29,6 +29,7 @@ jobs:
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
pytest
|
pytest
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [test]
|
needs: [test]
|
||||||
|
|
@ -55,6 +56,47 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
python setup.py sdist bdist_wheel
|
python setup.py sdist bdist_wheel
|
||||||
twine upload dist/*
|
twine upload dist/*
|
||||||
|
|
||||||
|
deploy_static_docs:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [deploy]
|
||||||
|
# if: "!github.event.release.prerelease"
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: '3.9'
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
name: Configure pip caching
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pip
|
||||||
|
key: ${{ runner.os }}-publish-pip-${{ hashFiles('**/setup.py') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-publish-pip-
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install -e .[docs]
|
||||||
|
python -m pip install sphinx-to-sqlite==0.1a1
|
||||||
|
- 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: google-github-actions/setup-gcloud@master
|
||||||
|
with:
|
||||||
|
version: '275.0.0'
|
||||||
|
service_account_email: ${{ secrets.GCP_SA_EMAIL }}
|
||||||
|
service_account_key: ${{ secrets.GCP_SA_KEY }}
|
||||||
|
- name: Deploy stable-docs.datasette.io to Cloud Run
|
||||||
|
run: |-
|
||||||
|
gcloud config set run/region us-central1
|
||||||
|
gcloud config set project datasette-222320
|
||||||
|
datasette publish cloudrun docs.db \
|
||||||
|
--service=datasette-docs-stable
|
||||||
|
|
||||||
deploy_docker:
|
deploy_docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [deploy]
|
needs: [deploy]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue