mirror of
https://github.com/simonw/datasette.git
synced 2026-09-28 21:04:08 +02:00
Publish stable and latest documentation databases to S3
This commit is contained in:
parent
36acd1ea92
commit
186be52863
2 changed files with 17 additions and 21 deletions
22
.github/workflows/publish.yml
vendored
22
.github/workflows/publish.yml
vendored
|
|
@ -51,6 +51,8 @@ jobs:
|
|||
- name: Publish
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
|
||||
# After the first non-prerelease 1.0 release, disable this job on 0.65.x,
|
||||
# even for later 0.65 releases, so they cannot overwrite the 1.0 stable docs.
|
||||
deploy_static_docs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [deploy]
|
||||
|
|
@ -66,26 +68,20 @@ jobs:
|
|||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install . --group dev
|
||||
python -m pip install sphinx-to-sqlite==0.1a1
|
||||
python -m pip install sphinx-to-sqlite==0.1a1 "s3-credentials>=0.17"
|
||||
- name: Build docs.db
|
||||
run: |-
|
||||
cd docs
|
||||
DISABLE_SPHINX_INLINE_TABS=1 sphinx-build -b xml . _build
|
||||
sphinx-to-sqlite ../docs.db _build
|
||||
cd ..
|
||||
- id: auth
|
||||
name: Authenticate to Google Cloud
|
||||
uses: google-github-actions/auth@v2
|
||||
with:
|
||||
credentials_json: ${{ secrets.GCP_SA_KEY }}
|
||||
- name: Set up Cloud SDK
|
||||
uses: google-github-actions/setup-gcloud@v3
|
||||
- name: Deploy stable-docs.datasette.io to Cloud Run
|
||||
- name: Upload stable documentation database to S3
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DATASETTE_DOCS_ACCESS_KEY }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DATASETTE_DOCS_SECRET_KEY }}
|
||||
run: |-
|
||||
gcloud config set run/region us-central1
|
||||
gcloud config set project datasette-222320
|
||||
datasette publish cloudrun docs.db \
|
||||
--service=datasette-docs-stable
|
||||
s3-credentials put-object datasette-docs docs.db docs.db \
|
||||
--content-type application/octet-stream
|
||||
|
||||
deploy_docker:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue