-
Notifications
You must be signed in to change notification settings - Fork 192
95 lines (86 loc) · 2.52 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
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: ./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: ./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