-
Notifications
You must be signed in to change notification settings - Fork 8
38 lines (33 loc) · 977 Bytes
/
docfx.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
name: Publish documentation
on:
push:
branches:
- master
- docfx-action
jobs:
publish-docs:
name: Publish documentation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Dotnet Setup
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Update docfx
run: dotnet tool update -g docfx
- name: Build documentation
run: docfx docfx/docfx.json
- name: Publish to GitHub Pages
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git clone https://${{ secrets.PERSONAL_TOKEN }}@github.com/sk-zk/sk-zk.github.io.git
cd sk-zk.github.io
rm -rf trucklib
mkdir -p trucklib/master
cp -r ../docfx/_site/* trucklib/master
git add .
git diff-index --quiet HEAD || git commit -m "Update TruckLib documentation"
git push