Skip to content

chore: Previews when PRs are approved (#75) #19

chore: Previews when PRs are approved (#75)

chore: Previews when PRs are approved (#75) #19

Workflow file for this run

name: Publish Voxel51 Docs
on:
push:
branches:
- main
paths-ignore:
- CONTRIBUTING.md
- GETTING_STARTED_FORMAT.md
- LICENSE
- README.md
- .gitignore
env:
BUILT_DOCS_DIR: site/
jobs:
publish-docs:
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
steps:
- uses: actions/checkout@v4
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
project_id: ${{ secrets.GCP_DOCS_PROJECT }}
service_account: ${{ secrets.GCP_DOCS_SERVICE_ACCOUNT }}
workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDP_SECRET_NAME }}
- name: Set Up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install python dependencies
run: |
python -m venv .venv && \
. .venv/bin/activate && \
pip install -r requirements.txt
- name: Install NPM dependencies
run: yarn install
- name: Build Docs
run: |
./build.sh --venv ./.venv/bin/activate
env:
NODE_OPTIONS: --max-old-space-size=4096
- name: Sync to bucket
uses: google-github-actions/upload-cloud-storage@v2
with:
path: ${{ env.BUILT_DOCS_DIR }}
destination: ${{ secrets.GCP_DOCS_LOCATION }}
parent: false