mirror of
https://github.com/maxartz15/template-unity-package.git
synced 2024-10-18 16:05:32 +02:00
66 lines
2.2 KiB
YAML
66 lines
2.2 KiB
YAML
|
name: Host DocFX Documentation
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches:
|
||
|
- master
|
||
|
|
||
|
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
|
||
|
|
||
|
# Taro Omiya here, want to copy a different file instead of README
|
||
|
- name: Build
|
||
|
run: |
|
||
|
cp CHANGELOG.md Documentation~/manual/changelog.md
|
||
|
docfx Documentation~/docfx.json
|
||
|
# Below is the original instructions by Erwan Normand
|
||
|
# - name: Build
|
||
|
# run: |
|
||
|
# cp README.md Documentation~/index.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
|