Skip to content

Commit 3d9aef9

Browse files
authored
Merge pull request #18 from NgrDavid/main
Fix GitHub Actions version specificity and update to modern GitHub Pages deployment
2 parents fa19b34 + 7369ae7 commit 3d9aef9

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,40 @@
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
push:
66
branches: [ main ]
77
workflow_dispatch:
88

9+
concurrency:
10+
group: build
11+
cancel-in-progress: true
12+
13+
permissions:
14+
# Both required by actions/deploy-pages
15+
pages: write
16+
id-token: write
17+
918
jobs:
1019
build:
1120
runs-on: windows-latest
1221
steps:
13-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v4
1423
name: Checkout
1524
with:
1625
submodules: recursive
1726

1827
- name: Setup .NET Core SDK
19-
uses: actions/setup-dotnet@v3.2.0
28+
uses: actions/setup-dotnet@v4
2029
with:
2130
dotnet-version: 7.x
2231

2332
- name: Custom Build Steps
2433
run: .\build.ps1
2534

2635
- name: Setup MSBuild
27-
uses: microsoft/setup-msbuild@v1
28-
36+
uses: microsoft/setup-msbuild@v2
37+
2938
- name: Restore NuGet Packages
3039
run: msbuild -t:restore src\harp\Bonsai.Harp.sln
3140

@@ -34,15 +43,9 @@ jobs:
3443

3544
- name: Build Documentation
3645
run: dotnet docfx docfx.json
37-
38-
- name: Checkout gh-pages
39-
uses: actions/checkout@v2
40-
with:
41-
ref: gh-pages
42-
path: gh-pages
43-
- name: Publish to github pages
44-
uses: peaceiris/actions-gh-pages@v3
45-
with:
46-
github_token: ${{ secrets.GITHUB_TOKEN }}
47-
publish_dir: _site
48-
force_orphan: true
46+
47+
- name: Upload GitHub Pages Artifact
48+
uses: actions/upload-pages-artifact@v3
49+
50+
- name: Deploy to GitHub Pages
51+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)