Skip to content

Commit 5ffdba2

Browse files
committed
build: Update GitHub Actions workflow to use .NET 8.x and latest DocFX
1 parent 5255acb commit 5ffdba2

File tree

1 file changed

+24
-19
lines changed

1 file changed

+24
-19
lines changed

.github/workflows/build-and-deploy.yml

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,28 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/setup-dotnet@v4
16-
17-
- name: Setup .NET Core
18-
uses: actions/setup-dotnet@v1
19-
with:
20-
dotnet-version: 7.0.x
21-
22-
- name: Setup DocFX
23-
run: |
24-
dotnet tool update -g docfx --version 2.60.2
15+
- uses: actions/checkout@v4
16+
17+
- name: Setup .NET Core
18+
uses: actions/setup-dotnet@v4
19+
with:
20+
dotnet-version: 8.x
21+
22+
- name: Setup DocFX
23+
run: dotnet tool update --global docfx
24+
25+
- name: Build with DocFX
26+
run: docfx docfx.json
27+
28+
- name: Setup Pages
29+
uses: actions/configure-pages@v5
2530

26-
- name: Build with DocFX
27-
run: docfx ./docfx.json
28-
29-
- name: Deploy to GitHub Pages
30-
if: github.event_name == 'push'
31-
uses: peaceiris/actions-gh-pages@v3
32-
with:
33-
github_token: ${{ secrets.GITHUB_TOKEN }}
34-
publish_dir: ./_site
31+
- name: Upload artifact
32+
uses: actions/upload-pages-artifact@v3
33+
with:
34+
path: './_site'
35+
36+
- name: Deploy to GitHub Pages
37+
id: deployment
38+
uses: actions/deploy-pages@v4
39+

0 commit comments

Comments
 (0)