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

Fix actions version specificity and update to modern pages deployment #23

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
41 changes: 23 additions & 18 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,56 @@
# Builds and publishes the documentation website to gh-pages branch
# Builds and publishes the documentation website
name: Build docs

on:
workflow_dispatch:

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

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

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

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2

- name: Restore NuGet Packages
run: msbuild -t:restore src/Bonsai.Scripting.Python.sln

- name: Build Solution
run: msbuild src/Bonsai.Scripting.Python.sln /p:Configuration=Release

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

- name: Setup DocFX
run: dotnet tool restore

- name: Setup Bonsai
working-directory: .bonsai
run: .\Setup.ps1

- name: Build Documentation
working-directory: docs
run: .\build.ps1

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

- name: Upload GitHub Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_site
force_orphan: true
path: docs/_site

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