mintlify docs #1148
Workflow file for this run
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: mintlify docs | |
on: | |
pull_request: | |
branches: [main] | |
paths: | |
- "autogen/**" | |
- "website/**" | |
- ".github/workflows/deploy-website-mintlify.yml" | |
- ".github/workflows/docs-check-broken-links.yml" | |
push: | |
branches: [main] | |
paths: | |
- "autogen/**" | |
- "website/**" | |
- ".github/workflows/deploy-website-mintlify.yml" | |
- ".github/workflows/docs-check-broken-links.yml" | |
workflow_dispatch: | |
merge_group: | |
types: [checks_requested] | |
permissions: | |
contents: write | |
jobs: | |
checks: | |
if: github.event_name != 'push' | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: website | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
fetch-depth: 0 | |
- uses: astral-sh/setup-uv@v5 | |
with: | |
version: "latest" | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
- name: setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
- name: Build documentation | |
run: | | |
uv pip install --system -e ".[docs]" | |
./scripts/docs_build.sh | |
working-directory: . | |
mintlify-release: | |
if: github.event_name != 'pull_request' | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: website | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
fetch-depth: 0 | |
- uses: astral-sh/setup-uv@v5 | |
with: | |
version: "latest" | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
- name: setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
- name: Build documentation | |
run: | | |
uv pip install --system -e ".[docs]" | |
./scripts/docs_build.sh | |
working-directory: . | |
- name: Prepare website content | |
run: | | |
# Create a temporary directory for filtered content | |
mkdir -p temp_website | |
# Copy files except .ipynb, node_modules, .quarto, .gitignore, and temp_website | |
find . -type f -not -path "*/node_modules/*" -not -path "*/.quarto/*" -not -path "./temp_website/*" -not -name "*.ipynb" -not -name ".gitignore" -exec cp --parents {} temp_website/ \; | |
- name: Deploy to Mintlify | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: mintlify-pages | |
publish_dir: ./website/temp_website |