-
Notifications
You must be signed in to change notification settings - Fork 3
63 lines (54 loc) · 1.42 KB
/
gh-pages.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
name: Github Pages 🌐
on:
push:
branches:
- 'master'
paths-ignore:
- '.github/ISSUE_TEMPLATE/*'
- '*.md'
- '*.nimble'
- '.gitignore'
- 'LICENSE'
pull_request:
paths-ignore:
- '.github/ISSUE_TEMPLATE/*'
- '*.md'
- '*.nimble'
- '.gitignore'
- 'LICENSE'
permissions:
contents: write
jobs:
before:
runs-on: windows-latest
if: "! contains(github.event.head_commit.message, '[skip ci]')"
steps:
- run: echo "not contains '[skip ci]'"
docs:
runs-on: windows-latest
needs: before
env:
nim_version: '2.0.0'
steps:
- uses: actions/checkout@v3
- name: Cache nimble
id: cache-nimble
uses: actions/cache@v1
with:
path: ~/.nimble
key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }}
- uses: jiro4989/setup-nim-action@v1
with:
nim-version: ${{ env.nim_version }}
- name: Install Dependencies 🔃
run: |
nimble refresh
nimble install -y -d
- name: Generate API documents 📃
run: nim doc --index:on -d:docgen --project --out:docs --hints:off src/happyx_native.nim
- name: Deploy documents 💨
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
if: github.ref == 'refs/heads/master'