1
- # Simple workflow for deploying static content to GitHub Pages
2
- name : Deploy static content to Pages
3
-
1
+ # Your GitHub workflow file under .github/workflows/
2
+ # Trigger the action on push to main
4
3
on :
5
- # Runs on pushes targeting the default branch
6
4
push :
7
- branches : ["main"]
8
-
9
- # Allows you to run this workflow manually from the Actions tab
10
- workflow_dispatch :
5
+ branches :
6
+ - main
11
7
12
8
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13
9
permissions :
14
- contents : read
10
+ actions : read
15
11
pages : write
16
12
id-token : write
17
13
@@ -20,28 +16,29 @@ permissions:
20
16
concurrency :
21
17
group : " pages"
22
18
cancel-in-progress : false
23
-
19
+
24
20
jobs :
25
- # Single deploy job since we're just deploying
26
- deploy :
21
+ publish-docs :
27
22
environment :
28
23
name : github-pages
29
24
url : ${{ steps.deployment.outputs.page_url }}
30
25
runs-on : ubuntu-latest
31
26
steps :
32
- - name : Checkout
33
- uses : actions/checkout@v4
34
- - name : docfx-action
35
- uses : nikeee/docfx-action@v1.0.0
36
- with :
37
- path : ' ../docs/docfx.json'
38
- - name : Setup Pages
39
- uses : actions/configure-pages@v4
40
- - name : Upload artifact
41
- uses : actions/upload-pages-artifact@v3
42
- with :
43
- # Upload entire repository
44
- path : ' ../docs/_site'
45
- - name : Deploy to GitHub Pages
46
- id : deployment
47
- uses : actions/deploy-pages@v4
27
+ - name : Checkout
28
+ uses : actions/checkout@v3
29
+ - name : Dotnet Setup
30
+ uses : actions/setup-dotnet@v3
31
+ with :
32
+ dotnet-version : 8.x
33
+
34
+ - run : dotnet tool update -g docfx
35
+ - run : docfx /docs/docfx.json
36
+
37
+ - name : Upload artifact
38
+ uses : actions/upload-pages-artifact@v3
39
+ with :
40
+ # Upload entire repository
41
+ path : ' /docs/_site'
42
+ - name : Deploy to GitHub Pages
43
+ id : deployment
44
+ uses : actions/deploy-pages@v4
0 commit comments