forked from icsharpcode/SharpZipLib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
25 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,41 +12,51 @@ on: | |
required: true | ||
|
||
jobs: | ||
docfx: | ||
build: | ||
runs-on: windows-latest | ||
name: Update DocFX documentation | ||
steps: | ||
- uses: actions/checkout@v2 | ||
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 | ||
|
||
# - uses: nikeee/[email protected] | ||
# name: Build Documentation | ||
# with: | ||
# args: docs/help/docfx.json | ||
|
||
- name: Install docfx | ||
run: choco install docfx | ||
|
||
- name: Build Documentation | ||
run: docfx docs/help/docfx.json --warningsAsErrors | ||
|
||
- uses: JamesIves/[email protected] | ||
name: Publish documentation to Github Pages | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: gh-pages | ||
FOLDER: docs/help/_site | ||
TARGET_FOLDER: help | ||
CLEAN: false | ||
|
||
- 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 | ||
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: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: gh-pages | ||
FOLDER: site | ||
TARGET_FOLDER: help | ||
CLEAN: false |