-
Notifications
You must be signed in to change notification settings - Fork 6
56 lines (45 loc) · 1.29 KB
/
Copy pathdeploy-docs.yml
File metadata and controls
56 lines (45 loc) · 1.29 KB
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
name: Deploy MkDocs to GitHub Pages
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# --- 1. Build React library and demo ---
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: |
npm ci
- name: Build React library
run: |
npm run build
- name: Build demo application
run: |
cd example && npm ci && npm run build
# --- 2. Build the MkDocs documentation ---
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install MkDocs dependencies
working-directory: docs-site
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Build MkDocs site
working-directory: docs-site
run: mkdocs build --strict
# --- 3. Deploy everything to GitHub Pages ---
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: docs-site/site
github_token: ${{ secrets.GITHUB_TOKEN }}
force_orphan: true