-
Notifications
You must be signed in to change notification settings - Fork 111
52 lines (44 loc) · 1.07 KB
/
ci.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
name: Build Docs
on:
push:
branches: [ master ]
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: nikeee/[email protected]
name: Build Documentation
with:
args: docfx.json
- uses: actions/upload-artifact@v4
with:
name: docs
path: _site
publish-docs:
needs: build-docs
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: 'gh-pages'
- name: Delete old docs
run: rm -rf *
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: docs
- name: Set CNAME
run: echo 'docs.prismlibrary.com' > CNAME
- name: Commit and push
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
if git diff --quiet --cached; then
echo 'No changes to commit'
else
git commit -m "Update docs"
git push
fi