Merge pull request #8 from harishmohanraj/fix-broken-images #9
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: Deploy Mintlify Website | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'autogen/**' | |
- 'website/**' | |
- '.github/workflows/deploy-website-mintlify.yml' | |
jobs: | |
deploy-website-mintlify: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
lfs: true | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.8" | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pydoc-markdown pyyaml termcolor nbconvert | |
pip install databind.core==4.4.2 databind.json==4.4.2 | |
- name: Install quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
- name: Convert Jupyter notebooks to MDX | |
run: | | |
python ./process_notebooks.py render | |
working-directory: website | |
- name: Prepare website content | |
run: | | |
# Create a temporary directory for filtered content | |
mkdir -p temp_website | |
# Copy files except .ipynb, node_modules, .quarto, and .gitignore | |
find website -type f -not -path "*/node_modules/*" -not -path "*/.quarto/*" -not -name "*.ipynb" -not -name ".gitignore" -exec cp --parents {} temp_website/ \; | |
- name: Deploy to mintlify-pages branch | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: mintlify-pages | |
folder: temp_website/website | |
clean: true # Automatically remove deleted files from the deploy branch |