-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
77 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Docs | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
filter: tree:0 | ||
lfs: true | ||
|
||
- name: 'Git Fetch Tags' | ||
run: git fetch --tags | ||
|
||
- name: Enable nuget package locking | ||
run: touch packages.lock.json | ||
|
||
- name: 'Install .NET SDK' | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
global-json-file: global.json | ||
cache: true | ||
|
||
- name: 'Dotnet Tool Restore' | ||
run: dotnet tool restore | ||
|
||
- name: 'Install markdownlint' | ||
run: npm install -g markdownlint-cli | ||
|
||
- name: 'Run markdownlint' | ||
run: markdownlint -c "${{ github.workspace }}/.markdownlint.json" "${{ github.workspace }}/Docs" | ||
|
||
- name: Generate table of contents | ||
run: DocFxTocGenerator --docfolder "${{ github.workspace }}/Docs" --sequence --override --index | ||
continue-on-error: false | ||
|
||
- name: Setup Pages | ||
id: pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: DocFX Build | ||
run: docfx "${{ github.workspace }}/Docs/docfx.json" | ||
continue-on-error: false | ||
|
||
- name: Upload artifact | ||
# Automatically uploads an artifact from the './_site' directory by default | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: ${{ github.workspace }}/Docs/_site | ||
|
||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |