-
-
Notifications
You must be signed in to change notification settings - Fork 138
66 lines (56 loc) · 1.69 KB
/
Documentation.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
name: Documentation
on:
workflow_dispatch:
push:
branches:
- v3
jobs:
apigen:
runs-on: ubuntu-22.04
name: ApiGen
steps:
- name: Checkout Project
uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Run ApiGen
run: bin/apigen
- name: Upload ApiGen output artifact
# Require non local GitHub Actions Runner & the projects default branch
if: env.ACT != 'true' && ${{ format('refs/heads/{0}', github.event.repository.default_branch) == github.ref }}
uses: actions/upload-artifact@v4
with:
name: apigen
path: build/apigen
pages:
runs-on: ubuntu-22.04
name: GitHub Pages
# Require non local GitHub Actions Runner & the projects default branch
if: env.ACT != 'true' && ${{ format('refs/heads/{0}', github.event.repository.default_branch) == github.ref }}
steps:
- name: Checkout GitHub Pages
uses: actions/checkout@v4
with:
fetch-depth: 10
ref: gh-pages
- name: Remove old ApiGen
run: rm -r api
- name: Download current ApiGen
uses: actions/download-artifact@v4
with:
name: apigen
path: api
- name: Download current README
uses: actions/checkout@v4
with:
sparse-checkout: |
README.md
sparse-checkout-cone-mode: false
- name: Update GitHub Pages index from README
run: mv README.md index.md
- name: Commit & Push GitHub Pages
uses: EndBug/add-and-commit@v9
with:
default_author: github_actor
message: 'Regenerated ApiGen documentation.'
cwd: gh-pages