forked from ag2ai/ag2
-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (45 loc) · 1.57 KB
/
deploy-website-mintlify.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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