Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use modern GitHub Pages deployment #178

Merged
merged 1 commit into from
Jan 3, 2025
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
44 changes: 21 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Builds and publishes the documentation website to gh-pages branch
# Builds and publishes the documentation website
name: Build docs

on:
Expand All @@ -7,17 +7,21 @@ on:
pull_request:
branches: [ main ]

concurrency:
group: docs
cancel-in-progress: true

jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4
with:
submodules: true

- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4.0.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x

Expand All @@ -44,6 +48,11 @@ jobs:
name: _site
path: _site
if-no-files-found: error

- name: Upload GitHub Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
path: _site

check:
name: Check Links
Expand All @@ -65,27 +74,16 @@ jobs:
fail: true

deploy:
name: Deploy docs to gh-pages
name: Deploy docs
runs-on: ubuntu-latest
needs: [ build, check ]
if: github.event_name == 'push'
steps:
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: _site
path: _site

permissions:
# Both required by actions/deploy-pages
pages: write
id-token: write

- name: Checkout gh-pages
uses: actions/[email protected]
with:
ref: gh-pages
path: gh-pages

- name: Publish to github pages
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _site
force_orphan: true

steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
Loading