Skip to content

feat(ai): hide unused providers when allow_provider_config is false (… #4213

feat(ai): hide unused providers when allow_provider_config is false (…

feat(ai): hide unused providers when allow_provider_config is false (… #4213

Workflow file for this run

name: Build and Deploy Docs
on:
# Deploy on push to main
push:
branches: [main]
# Deploy on workflow dispatch
workflow_dispatch: {}
concurrency:
group: ${{ github.workflow }}-${{ github.run_id }}
cancel-in-progress: false
permissions:
contents: read
id-token: write # required for Doppler OIDC
env:
UV_EXCLUDE_NEWER: "7 days"
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 12
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: 🔐 Fetch Doppler secrets
uses: dopplerhq/secrets-fetch-action@cd2efbf9a404504316435873eff298b82f7e0562 # v1.3.0
id: secrets
with:
auth-method: oidc
doppler-identity-id: ${{ vars.DOPPLER_IDENTITY_ID }}
doppler-project: marimo-oss
doppler-config: ci_docs
- name: 🐍 Setup uv
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
with:
enable-cache: true
python-version: 3.12
- name: ⚡ Install Vercel CLI
run: npm install --ignore-scripts --global vercel@50.44.0
- name: ⬇️ Pull Vercel Environment Information
env:
VERCEL_ORG_ID: ${{ steps.secrets.outputs.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ steps.secrets.outputs.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ steps.secrets.outputs.VERCEL_TOKEN }}
run: vercel pull --yes --environment=production
- name: 📚 Build docs
env:
VERCEL_ORG_ID: ${{ steps.secrets.outputs.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ steps.secrets.outputs.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ steps.secrets.outputs.VERCEL_TOKEN }}
run: vercel build --prod
- name: 📝 Generate markdown versions of docs
run: |
uv run --group docs python docs/scripts/html_to_markdown.py \
--input-dir .vercel/output/static \
--base-url https://docs.marimo.io
- name: 🔀 Add edge middleware for markdown content negotiation
run: |
mkdir -p .vercel/output/functions/_middleware.func
cp docs/scripts/middleware.js .vercel/output/functions/_middleware.func/index.js
echo '{"runtime":"edge","entrypoint":"index.js"}' > .vercel/output/functions/_middleware.func/.vc-config.json
uv run --group docs python docs/scripts/patch_vercel_config.py .vercel/output/config.json
- name: 📚 llms.txt
# Generated locally from the build artifact (the .md files produced by
# the step above) and the mkdocs nav — no live-site crawl, so it's
# always in sync with this commit. It's a compact index of links to the
# per-page .md files, not a full-content dump.
run: |
uv run --group docs python docs/scripts/generate_llms_txt.py \
--input-dir .vercel/output/static \
--base-url https://docs.marimo.io \
--output-index .vercel/output/static/llms.txt
- name: 📚 CLAUDE.md
run: cp docs/_static/CLAUDE.md .vercel/output/static/CLAUDE.md
# Skip deploy if a newer commit has landed on main while this run was building,
# so an older run can't overwrite a newer deploy. The run still completes green.
- name: 🔍 Check if still tip of main
id: latest
if: github.ref == 'refs/heads/main'
env:
GH_SHA: ${{ github.sha }}
GH_REPO: ${{ github.repository }}
run: |
LATEST_SHA=$(git ls-remote "https://github.com/${GH_REPO}.git" refs/heads/main | awk '{print $1}')
if [ "$LATEST_SHA" = "$GH_SHA" ]; then
echo "is_latest=true" >> "$GITHUB_OUTPUT"
else
echo "is_latest=false" >> "$GITHUB_OUTPUT"
echo "::notice::Skipping deploy — superseded by a newer commit on main ($LATEST_SHA)."
fi
- name: 🚀 Deploy to Vercel
if: github.ref == 'refs/heads/main' && steps.latest.outputs.is_latest == 'true'
env:
VERCEL_ORG_ID: ${{ steps.secrets.outputs.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ steps.secrets.outputs.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ steps.secrets.outputs.VERCEL_TOKEN }}
run: vercel deploy --prebuilt --prod