-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (60 loc) · 1.49 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
name: github pages
on:
push:
branches:
- main
jobs:
api-docs:
runs-on: ubuntu-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('nimword.nimble') }}
restore-keys: |
${{ runner.os }}-nimble-
- name: Setup nim
uses: jiro4989/setup-nim-action@v2
with:
nim-version: devel
- name: Install Packages
run: nimble install -y
- name: Build API docs
run: nimble --verbose apis
- name: Archive API docs
uses: actions/upload-artifact@v4
with:
name: api-docs
path: |
docs/apidocs
deploy-docs:
needs:
- 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 api-docs docs/
- name: Deploy
if: success()
uses: crazy-max/[email protected]
with:
target_branch: gh-pages
build_dir: ./docs
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}