Publish 0.65 documentation database to S3 and note 1.0 transition

This commit is contained in:
Simon Willison 2026-09-10 18:29:55 -07:00
commit e737d9e2fc
2 changed files with 12 additions and 13 deletions

View file

@ -64,6 +64,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]
@ -84,26 +86,20 @@ jobs:
- name: Install dependencies
run: |
python -m pip install -e .[docs]
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
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

View file

@ -48,6 +48,9 @@ jobs:
git commit -m "Populate docs/ from $LATEST_RELEASE" || echo "No changes"
git push -u origin stable
fi
# After the first non-prerelease 1.0 release, disable this workflow on 0.65.x
# (both release resets and !stable-docs updates), along with the docs.db
# upload in publish.yml. Later 0.65 releases must not replace the 1.0 docs.
- name: Handle Release
if: github.event_name == 'release' && !github.event.release.prerelease
run: |