Build docs #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Builds and publishes the documentation website to gh-pages branch | |
name: Build docs | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
# Build static site content using DocFX | |
- uses: nikeee/[email protected] | |
name: Build Documentation | |
with: | |
args: Docs/docfx.json | |
- name: Checkout gh-pages | |
uses: actions/checkout@v2 | |
with: | |
ref: gh-pages | |
path: gh-pages | |
- name: Publish to github pages | |
run: | | |
cd gh-pages | |
rm -rf * | |
touch .nojekyll | |
cp -a ../Docs/_site/. . | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add . | |
git commit --reset-author --amend -m "Deploy docs website" | |
git push --force origin gh-pages |