-
-
Notifications
You must be signed in to change notification settings - Fork 47
120 lines (99 loc) · 2.72 KB
/
docs.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: github pages
#on: [push] # debug
on:
push:
branches:
- devel
jobs:
framework-docs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Upgrade pip
run: |
# install pip=>20.1 to use "pip cache dir"
python -m pip install --upgrade pip
- name: Get pip cache dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: python -m pip install -r ./requirements.txt
- run: mkdocs build
- name: Archive framework docs
uses: actions/upload-artifact@v4
with:
name: framework-docs
path: |
site
api-docs:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache choosenim
id: cache-choosenim
uses: actions/cache@v4
with:
path: ~/.choosenim
key: ${{ runner.os }}-choosenim-stable
- name: Cache nimble
id: cache-nimble
uses: actions/cache@v4
with:
path: ~/.nimble
key: ${{ runner.os }}-nimble-${{ hashFiles('prologue.nimble') }}
restore-keys: |
${{ runner.os }}-nimble-
- name: Setup nim
uses: jiro4989/setup-nim-action@v2
with:
nim-version: stable
- name: Install Packages
run: nimble install -y
- name: Install extension
run: logue extension all
- name: Build API docs
run: nimble apis
- name: Archive API docs
uses: actions/upload-artifact@v4
with:
name: api-docs
path: |
docs/coreapi
docs/plugin
deploy-docs:
needs:
- framework-docs
- api-docs
runs-on: ubuntu-latest
steps:
- name: Download all docs
uses: actions/download-artifact@v4
- name: Check files
run: |
find .
- name: Setup docs
run: |
mv framework-docs/ docs/
rm -rf docs/coreapi docs/plugin
mv api-docs/coreapi api-docs/plugin docs/
- name: Deploy
if: success()
uses: crazy-max/ghaction-github-pages@v4.1.0
with:
target_branch: gh-pages
build_dir: ./docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}