-
Notifications
You must be signed in to change notification settings - Fork 114
64 lines (54 loc) · 1.91 KB
/
deploy_tutorials.yml
File metadata and controls
64 lines (54 loc) · 1.91 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
56
57
58
59
60
61
62
63
64
name: Publish Tutorials (Books)
on:
push:
branches: [ master ]
paths:
- "notes.programming_with_ai/**"
- "notes.startup_admin_guide/**"
- "blog/docs/styles/**"
- "blog/docs/assets/**"
- "helpers_root/dev_scripts_helpers/documentation/mkdocs/**"
- ".github/workflows/publish_tutorials_books.yml"
schedule:
- cron: "0 5 * * *"
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install MkDocs + plugins
run: |
pip install --upgrade pip
pip install mkdocs mkdocs-material pymdown-extensions mkdocs-blogging-plugin
# Build both books into the desired subpaths under _site/.
- name: Build notes.programming_with_ai
working-directory: notes.programming_with_ai
run: |
python ../helpers_root/dev_scripts_helpers/documentation/mkdocs/preprocess_mkdocs.py \
--input_dir docs --output_dir tmp.mkdocs -v INFO
mkdocs build -f mkdocs.yml --site-dir ../_site/books/notes.programming_with_ai
- name: Build notes.startup_admin_guide
working-directory: notes.startup_admin_guide
run: |
python ../helpers_root/dev_scripts_helpers/documentation/mkdocs/preprocess_mkdocs.py \
--input_dir docs --output_dir tmp.mkdocs -v INFO
mkdocs build -f mkdocs.yml --site-dir ../_site/books/notes.startup_admin_guide
- name: Configure Pages
uses: actions/configure-pages@v5
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: _site
- name: Deploy GitHub Pages
id: deployment
uses: actions/deploy-pages@v4