Merge pull request #134 from railsware/dependabot/nuget/Microsoft.Ext… #88
This file contains hidden or 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
name: Build and Deploy Documentation Site | |
on: | |
workflow_dispatch: | |
push: | |
# We want documentation to be published only from a stable branch | |
branches: | |
- main | |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
concurrency: | |
group: "documentation" | |
cancel-in-progress: false | |
jobs: | |
# Building documentation from source | |
build: | |
name: Build Documentation | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
# https://github.com/marketplace/actions/checkout | |
- name: Checkout Sources | |
uses: actions/checkout@v4 | |
# https://github.com/marketplace/actions/setup-net-core-sdk | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
- name: Install DocFx Tool | |
run: dotnet tool update -g docfx | |
- name: Build Documentation Site | |
run: docfx ./docs/docfx.json | |
# https://github.com/marketplace/actions/upload-github-pages-artifact | |
- name: Upload Pages Artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: './artifacts/docs' | |
# Deploying | |
deploy: | |
name: Deploy to GitHub Pages | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
# Add a dependency to the build job | |
needs: build | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
pages: write # required for GitHub Pages publish | |
id-token: write # required for requesting JWT | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
# https://github.com/marketplace/actions/deploy-github-pages-site | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |