Skip to content

Commit

Permalink
Fix unnecessary GitHub Actions version specificity, update old action…
Browse files Browse the repository at this point in the history
…s, and update to modern GitHub Pages deployment
  • Loading branch information
PathogenDavid committed Jan 2, 2025
1 parent 789b1b8 commit 7758c94
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 18 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ jobs:
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

- name: Restore NuGet Packages
run: dotnet restore Bonsai.ML.sln

- name: Build Solution
run: dotnet build Bonsai.ML.sln -c Release
run: dotnet build Bonsai.ML.sln -c Release
31 changes: 20 additions & 11 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
# 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_docs:
runs-on: windows-latest
Expand All @@ -14,31 +23,31 @@ jobs:
submodules: true

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

- name: Restore NuGet Packages
run: dotnet restore Bonsai.ML.sln

- name: Build Solution
run: dotnet build Bonsai.ML.sln -c Release

- 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: Publish to github pages
uses: peaceiris/actions-gh-pages@v3.9.3
- name: Upload GitHub Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_site
publish_branch: gh-pages
force_orphan: true
path: docs/_site

- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ jobs:
submodules: true

- name: Setup Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: 3.10

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

- name: Restore NuGet Packages
run: dotnet restore Bonsai.ML.sln

Expand Down

0 comments on commit 7758c94

Please sign in to comment.