Skip to content

Commit 7758c94

Browse files
committed
Fix unnecessary GitHub Actions version specificity, update old actions, and update to modern GitHub Pages deployment
1 parent 789b1b8 commit 7758c94

File tree

3 files changed

+27
-18
lines changed

3 files changed

+27
-18
lines changed

.github/workflows/build.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ jobs:
1313
runs-on: windows-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v4.1.1
16+
uses: actions/checkout@v4
1717
with:
1818
submodules: true
1919

2020
- name: Setup .NET Core SDK
21-
uses: actions/setup-dotnet@v4.0.0
21+
uses: actions/setup-dotnet@v4
2222
with:
2323
dotnet-version: 8.x
24-
24+
2525
- name: Restore NuGet Packages
2626
run: dotnet restore Bonsai.ML.sln
2727

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

.github/workflows/docs.yml

+20-11
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1-
# Builds and publishes the documentation website to gh-pages branch
1+
# Builds and publishes the documentation website
22
name: Build docs
33

44
on:
55
workflow_dispatch:
66

7+
concurrency:
8+
group: docs
9+
cancel-in-progress: true
10+
11+
permissions:
12+
# Both required by actions/deploy-pages
13+
pages: write
14+
id-token: write
15+
716
jobs:
817
build_docs:
918
runs-on: windows-latest
@@ -14,31 +23,31 @@ jobs:
1423
submodules: true
1524

1625
- name: Setup .NET Core SDK
17-
uses: actions/setup-dotnet@v4.0.0
26+
uses: actions/setup-dotnet@v4
1827
with:
1928
dotnet-version: 8.x
20-
29+
2130
- name: Restore NuGet Packages
2231
run: dotnet restore Bonsai.ML.sln
2332

2433
- name: Build Solution
2534
run: dotnet build Bonsai.ML.sln -c Release
26-
35+
2736
- name: Setup DocFX
2837
run: dotnet tool restore
2938

3039
- name: Setup Bonsai
3140
working-directory: .bonsai
3241
run: ./Setup.ps1
33-
42+
3443
- name: Build Documentation
3544
working-directory: docs
3645
run: ./build.ps1
3746

38-
- name: Publish to github pages
39-
uses: peaceiris/actions-gh-pages@v3.9.3
47+
- name: Upload GitHub Pages Artifact
48+
uses: actions/upload-pages-artifact@v3
4049
with:
41-
github_token: ${{ secrets.GITHUB_TOKEN }}
42-
publish_dir: docs/_site
43-
publish_branch: gh-pages
44-
force_orphan: true
50+
path: docs/_site
51+
52+
- name: Deploy to GitHub Pages
53+
uses: actions/deploy-pages@v4

.github/workflows/test.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ jobs:
1414
submodules: true
1515

1616
- name: Setup Python 3.10
17-
uses: actions/setup-python@v3
17+
uses: actions/setup-python@v5
1818
with:
1919
python-version: 3.10
2020

2121
- name: Setup .NET Core SDK
22-
uses: actions/setup-dotnet@v4.0.0
22+
uses: actions/setup-dotnet@v4
2323
with:
2424
dotnet-version: 8.x
25-
25+
2626
- name: Restore NuGet Packages
2727
run: dotnet restore Bonsai.ML.sln
2828

0 commit comments

Comments
 (0)