Skip to content

Commit 76eb6c4

Browse files
authored
ci: split docs gen to build/deploy
1 parent f6e1987 commit 76eb6c4

File tree

1 file changed

+25
-15
lines changed

1 file changed

+25
-15
lines changed

.github/workflows/release.yml

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,41 +12,51 @@ on:
1212
required: true
1313

1414
jobs:
15-
docfx:
15+
build:
1616
runs-on: windows-latest
1717
name: Update DocFX documentation
1818
steps:
1919
- uses: actions/checkout@v2
2020
with:
2121
ref: ${{ github.events.inputs.tag }}
22+
2223
- name: Setup .NET
2324
uses: actions/setup-dotnet@v1
2425
with:
2526
dotnet-version: '6.0.x'
27+
2628
- name: Build project
2729
run: dotnet build -f netstandard2.0 src/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.csproj
2830

29-
# - uses: nikeee/[email protected]
30-
# name: Build Documentation
31-
# with:
32-
# args: docs/help/docfx.json
33-
3431
- name: Install docfx
3532
run: choco install docfx
3633

3734
- name: Build Documentation
3835
run: docfx docs/help/docfx.json --warningsAsErrors
3936

40-
- uses: JamesIves/[email protected]
41-
name: Publish documentation to Github Pages
42-
with:
43-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44-
BRANCH: gh-pages
45-
FOLDER: docs/help/_site
46-
TARGET_FOLDER: help
47-
CLEAN: false
48-
4937
- name: Upload documentation as artifact
5038
uses: actions/upload-artifact@v2
5139
with:
40+
name: site
5241
path: docs/help/_site
42+
43+
deploy:
44+
needs: [build] # The second job must depend on the first one to complete before running and uses ubuntu-latest instead of windows.
45+
runs-on: ubuntu-latest
46+
steps:
47+
- name: Checkout
48+
uses: actions/checkout@v3
49+
50+
- name: Download Artifacts 🔻 # The built project is downloaded into the 'site' folder.
51+
uses: actions/download-artifact@v1
52+
with:
53+
name: site
54+
55+
- name: Publish documentation to Github Pages
56+
uses: JamesIves/github-pages-deploy-action@v4
57+
with:
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
BRANCH: gh-pages
60+
FOLDER: site
61+
TARGET_FOLDER: help
62+
CLEAN: false

0 commit comments

Comments
 (0)