-
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (54 loc) · 2.04 KB
/
documentation.yml
File metadata and controls
62 lines (54 loc) · 2.04 KB
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
name: Host DocFX Documentation
on:
push:
branches:
- main
jobs:
# Build the documentation
build:
if: # Adding if-statement to prevent this job from running on packages using this template.
# If you want to run this documentation job, just take out the if-field and value below.
github.repository == 'OmiyaGames/template-unity-package'
runs-on: windows-latest # Required by DocFX
steps:
- name: Checkout
uses: actions/checkout@v2
# with:
# submodules: true
- name: Install DocFX
run: choco install -y docfx
# Copy over a few markdown files before generating the documentation
- name: Build
run: |
cp README.md Documentation~/index.md
cp CHANGELOG.md Documentation~/manual/changelog.md
docfx Documentation~/docfx.json
# Upload the generated documentation
- name: Upload site artifact
uses: actions/upload-artifact@v1
with:
name: _site
path: _site # Must equals the 'build.dest' value on your docfx.json
# Deploy the generated documentation to the gh-pages branch
deploy:
needs: build
if: # Adding if-statement to prevent this job from running on packages using this template.
# If you want to run this documentation job, just take out the if-field and value below.
github.repository == 'OmiyaGames/template-unity-package'
runs-on: ubuntu-latest # Required by 'JamesIves/github-pages-deploy-action'
steps:
- name: Checkout
uses: actions/checkout@v2
# with:
# submodules: true
# Download the generated documentation
- name: Download site artifact
uses: actions/download-artifact@v1
with:
name: _site
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.AccessToken }} # You need some setup, see https://github.com/JamesIves/github-pages-deploy-action
BRANCH: gh-pages
FOLDER: _site