mirror of
https://github.com/simonw/datasette.git
synced 2026-09-26 11:54:07 +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
16
.github/workflows/deploy-latest.yml
vendored
16
.github/workflows/deploy-latest.yml
vendored
|
|
@ -46,7 +46,7 @@ jobs:
|
|||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
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: Run tests
|
||||
if: ${{ steps.deployment-prerequisites.outputs.available == 'true' && github.ref == 'refs/heads/main' }}
|
||||
run: |
|
||||
|
|
@ -148,12 +148,12 @@ jobs:
|
|||
--install 'datasette-ephemeral-tables>=0.2.2' \
|
||||
--service "datasette-latest$SUFFIX" \
|
||||
--secret $LATEST_DATASETTE_SECRET
|
||||
- name: Deploy to docs as well (only for main)
|
||||
- name: Upload latest documentation database to S3 (only for main)
|
||||
if: ${{ steps.deployment-prerequisites.outputs.available == 'true' && github.ref == 'refs/heads/main' }}
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DATASETTE_DOCS_ACCESS_KEY }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DATASETTE_DOCS_SECRET_KEY }}
|
||||
run: |-
|
||||
# Deploy docs.db to a different service
|
||||
datasette publish cloudrun docs.db \
|
||||
--branch=$GITHUB_SHA \
|
||||
--version-note=$GITHUB_SHA \
|
||||
--extra-options="--setting template_debug 1" \
|
||||
--service=datasette-docs-latest
|
||||
# Keep development documentation separate from the stable release database.
|
||||
s3-credentials put-object datasette-docs latest/docs.db docs.db \
|
||||
--content-type application/octet-stream
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue