Publish Docs #48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Docs | |
on: | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: 'read' | |
id-token: 'write' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build Docker image | |
run: make build | |
- name: Build Examples | |
run: make examples | |
- name: Build Tutorial | |
run: make tutorial | |
- name: Build OpenNGC Data Reference | |
run: make scripts SCRIPT=ongc_docdata | |
- name: Build Docs | |
run: make docs-build | |
- name: Set Version Environment Variable | |
run: | | |
echo "STARPLOT_VERSION=$(make version)" >> "$GITHUB_ENV" | |
- id: 'auth' | |
uses: 'google-github-actions/auth@v2' | |
with: | |
credentials_json: '${{ secrets.GCP_CREDENTIALS }}' | |
- name: 'Set up Google Cloud SDK' | |
uses: 'google-github-actions/setup-gcloud@v2' | |
with: | |
version: '>= 363.0.0' | |
- name: 'Sync docs to [primary] Cloud Storage Bucket' | |
run: 'gsutil -m rsync -R -d site gs://starplot.dev' | |
- name: 'Sync docs to [archives] Cloud Storage Bucket' | |
run: 'gsutil -m rsync -R -d site gs://archives.starplot.dev/$STARPLOT_VERSION' |