-
Notifications
You must be signed in to change notification settings - Fork 36
66 lines (52 loc) · 1.35 KB
/
build.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: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
prose:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Vale
uses: errata-ai/vale-action@master
with:
files: articles/.
env:
# Required
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
deploy:
needs: [prose]
runs-on: windows-latest
if: (github.event_name == 'push')
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
# See https://github.com/actions/checkout/issues/165#issuecomment-657673315
- name: Create LFS file list
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
- name: Restore LFS cache
uses: actions/cache@v3
id: lfs-cache
with:
path: .git/lfs
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}-v1
- name: Git LFS Pull
run: git lfs pull
- name: Install DocFX
run: choco install docfx -y
- name: Build
shell: pwsh
run: ./build-ci.ps1
- name: Deploy
uses: peaceiris/actions-gh-pages@v3.9.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_site
force_orphan: true