-
Notifications
You must be signed in to change notification settings - Fork 176
54 lines (44 loc) · 1.48 KB
/
docs.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
name: Build and Publish Docs
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
EXILED_REFERENCES_URL: https://cdn.exiled.to/Dev.zip
EXILED_REFERENCES_PATH: ${{ github.workspace }}/References
jobs:
build_and_publish_docs:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v1.7.2
- name: Setup Nuget
uses: iRebbok/setup-nuget@master
- name: Get references
shell: pwsh
run: |
Invoke-WebRequest -Uri ${{ EXILED_REFERENCES_URL }} -OutFile ${{ github.workspace }}/References.zip
Expand-Archive -Path References.zip -DestinationPath ${{ env.EXILED_REFERENCES_PATH }}
- name: Download DocFX
uses: crazy-max/ghaction-chocolatey@v1
with:
args: install docfx --pre
- name: Run DocFX
env:
EXILED_REFERENCES: ${{ env.EXILED_REFERENCES_PATH }}
run: docfx docfx.json; docfx docfx.json
- name: Deploy to GitHub Pages
if: github.event_name == 'push' && success() #Only publishes on push to master to avoid docs mishaps
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: _site
keep_history: true
jekyll: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}