Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ on:
- "docs/**"
- "docs-site/**"
- ".github/workflows/deploy-docs.yaml"
schedule:
# Rebuild daily at 6am UTC to pick up any API spec changes
- cron: "0 6 * * *"

env:
# GCS bucket for static docs files (e.g., "everyrow-docs")
Expand Down Expand Up @@ -57,6 +60,9 @@ jobs:
- name: Convert notebooks to HTML
run: uv run --group case-studies python docs-site/scripts/convert-notebooks.py

- name: Fetch OpenAPI spec
run: python3 docs-site/scripts/fetch-openapi.py

# --- Node.js setup for docs site ---
- name: Install pnpm
uses: pnpm/action-setup@v4
Expand All @@ -82,17 +88,17 @@ jobs:
run: python docs-site/scripts/check-links.py

- name: Log in to Google Cloud
if: ${{ github.ref == 'refs/heads/main' || inputs.deploy_production }}
if: ${{ github.ref == 'refs/heads/main' || inputs.deploy_production || github.event_name == 'schedule' }}
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_CREDENTIALS_GLOBAL }}

- name: Set up Cloud SDK
if: ${{ github.ref == 'refs/heads/main' || inputs.deploy_production }}
if: ${{ github.ref == 'refs/heads/main' || inputs.deploy_production || github.event_name == 'schedule' }}
uses: google-github-actions/setup-gcloud@v2

- name: Deploy docs site to GCS
if: ${{ github.ref == 'refs/heads/main' || inputs.deploy_production }}
if: ${{ github.ref == 'refs/heads/main' || inputs.deploy_production || github.event_name == 'schedule' }}
working-directory: ./docs-site
run: |
gsutil -m -h "Cache-Control:max-age=300" rsync -r -d ./out/ gs://${{ env.DOCS_BUCKET }}
3 changes: 3 additions & 0 deletions docs-site/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ dist/
# Generated notebook HTML (built from docs/case_studies/)
src/notebooks/

# Generated OpenAPI spec (fetched at build time from live API)
public/openapi.json

# Debug
npm-debug.log*
yarn-debug.log*
Expand Down
4 changes: 3 additions & 1 deletion docs-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
"version": "0.1.0",
"private": true,
"scripts": {
"predev": "cd .. && uv run --group case-studies python docs-site/scripts/convert-notebooks.py",
"predev": "cd .. && uv run --group case-studies python docs-site/scripts/convert-notebooks.py && python3 docs-site/scripts/fetch-openapi.py",
"dev": "next dev",
"prebuild": "python3 scripts/fetch-openapi.py",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@scalar/api-reference-react": "^0.8.66",
"gray-matter": "^4.0.3",
"highlight.js": "^11.11.1",
"next": "16.1.6",
Expand Down
Loading