mirror of
https://github.com/dotMorten/NmeaParser.git
synced 2025-12-06 07:12:04 +01:00
Fix doc publish script (#67)
* Test branch * Test1 * Test2 * test3 * test4 * Test5 * test6 * Test6 * Test7 * Test8 * Test8 * Test9 * Test10 * Test11 * test12 * test13 * test14 * Test15 * test16 * Test17 * Test18 * Test19 * Test20 * Test21 * Test22 * Update ghpages.yml * Update ghpages.yml * Update ghpages.yml * test24 * Update ghpages.yml * Update ghpages.yml * Update ghpages.yml * Update ghpages.yml * fix branch name * Update ghpages.yml * Update ghpages.yml * Update ghpages.yml * Update ghpages.yml * Update ghpages.yml * Update ghpages.yml * Update ghpages.yml * Update ghpages.yml * Update ghpages.yml * Update ghpages.yml * Update ghpages.yml * Update ghpages.yml * Update ghpages.yml * Update ghpages.yml * Update ghpages.yml * Update ghpages.yml * Update ghpages.yml * Update ghpages.yml * Update ghpages.yml * Update ghpages.yml * Update ghpages.yml * Update ghpages.yml * Delete Documentation.csproj
This commit is contained in:
parent
fb1557c386
commit
6f17b13f33
56
.github/workflows/ghpages.yml
vendored
56
.github/workflows/ghpages.yml
vendored
|
|
@ -11,29 +11,43 @@ jobs:
|
|||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Clone NmeaParser
|
||||
uses: actions/checkout@v1
|
||||
# - name: Install .NET OMD Generator
|
||||
# run: dotnet tool install --tool-path artifacts/toolset dotMorten.OmdGenerator --version 1.2.0
|
||||
- name: restore nuget packages
|
||||
run: dotnet msbuild /t:restore src/NmeaParser/NmeaParser.csproj
|
||||
# - name: Generate OMD
|
||||
# run: |
|
||||
# mkdir artifacts/docs/api
|
||||
# artifacts/toolset/generateomd /source=src/NmeaParser /output=artifacts/docs/api/omd.html
|
||||
- name: Build Documentation
|
||||
run: build\GenerateDoc.cmd
|
||||
# uses: nikeee/docfx-action@master
|
||||
# with:
|
||||
# args: docs/docfx.json
|
||||
|
||||
- name: Download DocFX
|
||||
run: |
|
||||
mkdir .tools/docfx
|
||||
Invoke-WebRequest -Uri "https://github.com/dotnet/docfx/releases/download/v${env:DOCFXVERSION}/docfx.zip" -OutFile ".tools/docfx/docfx.zip"
|
||||
[System.IO.Compression.ZipFile]::ExtractToDirectory(".tools/docfx/docfx.zip", ".tools/docfx" )
|
||||
env:
|
||||
DOCFXVERSION: 2.48.1
|
||||
|
||||
- name: Install .NET OMD Generator
|
||||
run: dotnet tool install --tool-path .tools/omd dotMorten.OmdGenerator --version 1.2.0
|
||||
|
||||
- name: Generate OMD
|
||||
run: |
|
||||
mkdir artifacts/docs/api
|
||||
.tools/omd/generateomd /source=src/NmeaParser /output=artifacts/docs/api/omd.html
|
||||
|
||||
- name: Build Documentation
|
||||
run: .tools/docfx/docfx.exe docs/docfx.json
|
||||
|
||||
- name: Publish Documentation
|
||||
# uses: maxheld83/ghpages@master
|
||||
# env:
|
||||
# BUILD_DIR: artifacts/docs_site
|
||||
# GH_PAT: ${{ secrets.GH_PAT }}
|
||||
uses: JamesIves/github-pages-deploy-action@releases/v3
|
||||
with:
|
||||
env:
|
||||
ACCESS_TOKEN: ${{ secrets.GH_PAT }}
|
||||
BRANCH: gh-pages # The branch the action should deploy to.
|
||||
FOLDER: artifacts/docs_site # The folder the action should deploy.
|
||||
BRANCH: gh-pages
|
||||
DOCSFOLDER: artifacts/docs_site
|
||||
shell: cmd
|
||||
run: |
|
||||
cd %DOCSFOLDER%
|
||||
git init
|
||||
git config --local user.name "%GITHUB_ACTOR%"
|
||||
git config --local user.email "%GITHUB_ACTOR%@users.noreply.github.com"
|
||||
git config --local core.autocrlf false
|
||||
git add .
|
||||
git commit -m "Auto-update doc from commit %GITHUB_SHA%"
|
||||
git push --force https://%ACCESS_TOKEN%@github.com/%GITHUB_REPOSITORY%.git master:%BRANCH%
|
||||
rmdir .git /S /Q
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue