Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 35 additions & 14 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,13 @@ permissions:
contents: read

jobs:
publish-docs:
runs-on: ubuntu-latest

concurrency:
group: ${{ github.event_name == 'pull_request' && github.event.ref || github.workflow }}
cancel-in-progress: false

permissions:
contents: write
pages: write
build-docs:
runs-on: ubuntu-latest

steps:
- name: Checkout

- name: Checkout code
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

- name: Lint Markdown files
Expand All @@ -48,12 +42,39 @@ jobs:
dotnet build --configuration Release /p:SKIP_POLLY_ANALYZERS=true
dotnet docfx docs/docfx.json

- name: Publish documentation
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: docs
path: docs/_site
if-no-files-found: error

publish-docs:
needs: [ build-docs ]
runs-on: ubuntu-latest
if: |
github.event.repository.fork == false &&
github.ref_name == github.event.repository.default_branch

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

permissions:
contents: write
pages: write

steps:

- name: Download documentation
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: docs
path: docs

- name: Deploy to GitHub Pages
if: |
github.event.repository.fork == false &&
github.ref_name == github.event.repository.default_branch
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_site
publish_dir: docs
cname: www.pollydocs.org