-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (72 loc) · 2.11 KB
/
publish_docs.yaml
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
name: Publish docs
on:
push:
branches:
- main
jobs:
publish_admin_docs:
name: Deploy admin docs
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
pip install mkdocs
pip install mkdocs-static-i18n[material]
pip install mkdocs-awesome-pages-plugin
- name: Build MkDocs
run: |
cd documentation/admin
mkdocs build
zip -r admin_docs.zip site
- name: Create artifcat
uses: actions/upload-artifact@v4
with:
name: admin_docs
path: documentation/admin/admin_docs.zip
- name: Deploy to server
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.HOST_USERNAME }}
key: ${{ secrets.PRIVATE_KEY }}
source: "documentation/admin/site"
target: "${{ secrets.PROJECT_PATH }}"
publish_user_docs:
name: Deploy user docs
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
pip install mkdocs
pip install mkdocs-static-i18n[material]
pip install mkdocs-awesome-pages-plugin
- name: Build MkDocs
run: |
cd documentation/user
mkdocs build
zip -r user_docs.zip site
- name: Create artifcat
uses: actions/upload-artifact@v4
with:
name: user_docs
path: documentation/user/user_docs.zip
- name: Deploy to server
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.HOST_USERNAME }}
key: ${{ secrets.PRIVATE_KEY }}
source: "documentation/user/site"
target: "${{ secrets.PROJECT_PATH }}"