Skip to content

Commit e49ddf8

Browse files
committed
ci: update docs workflow
1 parent c3fafaf commit e49ddf8

File tree

1 file changed

+27
-25
lines changed

1 file changed

+27
-25
lines changed

.github/workflows/docs.yml

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Your GitHub workflow file under .github/workflows/
2-
# Trigger the action on push to main
31
name: docs
42
on:
53
workflow_dispatch:
@@ -9,6 +7,7 @@ on:
97
push:
108
branches:
119
- "main"
10+
- "dev"
1211

1312
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1413
permissions:
@@ -21,27 +20,30 @@ permissions:
2120
concurrency:
2221
group: "pages"
2322
cancel-in-progress: false
24-
23+
2524
jobs:
26-
publish-docs:
27-
runs-on: ubuntu-latest
28-
steps:
29-
- name: Checkout
30-
uses: actions/checkout@v4
31-
- name: dotnet Setup
32-
uses: actions/setup-dotnet@v4
33-
with:
34-
dotnet-version: |
35-
8.x
36-
9.x
37-
10.x
38-
- run: dotnet tool update -g docfx
39-
- run: docfx docs/docfx.json
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
25+
publish-docs:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
- name: dotnet Setup
31+
uses: actions/setup-dotnet@v4
32+
with:
33+
dotnet-version: |
34+
8.x
35+
9.x
36+
10.x
37+
- name: Setup documentation
38+
run: |
39+
mv README.md docs/index.md
40+
mv README.zh.md docs/README.zh.md
41+
dotnet tool update -g docfx
42+
docfx docs/docfx.json
43+
- name: Upload artifact
44+
uses: actions/upload-pages-artifact@v3
45+
with:
46+
path: 'docs/_site'
47+
- name: Deploy to GitHub Pages
48+
id: deployment
49+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)