-
Notifications
You must be signed in to change notification settings - Fork 982
63 lines (52 loc) · 1.63 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Workflow to execute when a new version is released
name: Release
on:
release:
# Used for testing and manual execution
workflow_dispatch:
inputs:
tag:
description: 'Tag Ref'
required: true
jobs:
build:
runs-on: windows-latest
name: Generate DocFX documentation
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.events.inputs.tag }}
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Build project
run: dotnet build -f netstandard2.0 src/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.csproj
- name: Install docfx
run: choco install docfx
- name: Build Documentation
run: docfx docs/help/docfx.json --warningsAsErrors
- name: Upload documentation as artifact
uses: actions/upload-artifact@v2
with:
name: site
path: docs/help/_site
deploy:
needs: [build] # The second job must depend on the first one to complete before running and uses ubuntu-latest instead of windows.
runs-on: ubuntu-latest
name: Update github pages docs
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download Artifacts # The built project is downloaded into the 'site' folder.
uses: actions/download-artifact@v1
with:
name: site
- name: Publish documentation to Github Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: site
target-folder: help
clean: false