Commit 9733b5f 1 parent 07ee05d commit 9733b5f Copy full SHA for 9733b5f
File tree 1 file changed +47
-7
lines changed
1 file changed +47
-7
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ name: Docs
9
9
on :
10
10
push :
11
11
branches :
12
- - main
12
+ - main
13
13
workflow_dispatch :
14
14
15
15
permissions : {}
19
19
DOTNET_CLI_TELEMETRY_OPTOUT : true
20
20
21
21
jobs :
22
- deploy :
22
+ publish :
23
23
name : Publish docs
24
24
runs-on : ubuntu-latest
25
25
permissions :
26
26
contents : write
27
27
steps :
28
-
29
28
- name : Checkout
30
29
uses : actions/checkout@v4
31
30
with :
@@ -54,13 +53,54 @@ jobs:
54
53
Invoke-Build BuildDocs
55
54
shell : pwsh
56
55
56
+ - name : Checkout gh-pages
57
+ uses : actions/checkout@v4
58
+ with :
59
+ ref : refs/heads/gh-pages
60
+ path : site/
61
+
57
62
- name : Build site
58
63
run : mkdocs build
59
64
env :
60
65
MKDOCS_GIT_COMMITTERS_APIKEY : ${{ secrets.GITHUB_TOKEN }}
61
66
62
- - name : Deploy
63
- uses : peaceiris/actions-gh-pages@v3
67
+ - name : Push content
68
+ run : |
69
+ cd site/
70
+ git config user.name github-actions
71
+ git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
72
+ git add *
73
+ git commit -m "deploy ${{ github.sha }}"
74
+ git push
75
+
76
+ deploy :
77
+ name : Deploy pages
78
+ environment :
79
+ name : github-pages
80
+ url : ${{ steps.deployment.outputs.page_url }}
81
+ runs-on : ubuntu-latest
82
+ needs : [publish]
83
+ concurrency :
84
+ group : pages
85
+ cancel-in-progress : false
86
+ permissions :
87
+ contents : read
88
+ pages : write
89
+ id-token : write
90
+ steps :
91
+ - name : Checkout
92
+ uses : actions/checkout@v4
64
93
with :
65
- github_token : ${{ secrets.GITHUB_TOKEN }}
66
- publish_dir : ./site
94
+ ref : refs/heads/gh-pages
95
+
96
+ - name : Setup Pages
97
+ uses : actions/configure-pages@v5
98
+
99
+ - name : Upload artifact
100
+ uses : actions/upload-pages-artifact@v3
101
+ with :
102
+ path : ' .'
103
+
104
+ - name : Deploy to GitHub Pages
105
+ id : deployment
106
+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments