|
@@ -5,9 +5,51 @@ on:
|
|
branches: [main, develop, v2_develop]
|
|
branches: [main, develop, v2_develop]
|
|
|
|
|
|
jobs:
|
|
jobs:
|
|
- generate-docs:
|
|
|
|
- runs-on: windows-latest
|
|
|
|
|
|
+ # generate-docs:
|
|
|
|
+ # runs-on: windows-latest
|
|
|
|
+
|
|
|
|
+ # steps:
|
|
|
|
+ # - name: Checkout
|
|
|
|
+ # uses: actions/checkout@v3
|
|
|
|
+
|
|
|
|
+ # - name: Setup .NET Core
|
|
|
|
+ # uses: actions/[email protected]
|
|
|
|
+ # with:
|
|
|
|
+ # dotnet-version: 7.0
|
|
|
|
+ # dotnet-quality: 'ga'
|
|
|
|
+
|
|
|
|
+ # - name: Setup DocFX
|
|
|
|
+ # uses: crazy-max/ghaction-chocolatey@v2
|
|
|
|
+ # with:
|
|
|
|
+ # args: install docfx
|
|
|
|
+
|
|
|
|
+ # - name: Install dependencies
|
|
|
|
+ # run: dotnet restore
|
|
|
|
|
|
|
|
+ # - name: DocFX Build
|
|
|
|
+ # working-directory: docfx
|
|
|
|
+ # # https://stackoverflow.com/questions/56726429/how-to-run-multiple-commands-in-one-github-actions-docker
|
|
|
|
+ # run: |
|
|
|
|
+ # rm ../docs -Recurse -Force -ErrorAction SilentlyContinue
|
|
|
|
+ # rm ../api -Recurse -Force -ErrorAction SilentlyContinue
|
|
|
|
+ # $env:DOCFX_SOURCE_BRANCH_NAME="${{ github.ref_name }}"
|
|
|
|
+ # docfx docfx.json
|
|
|
|
+ # continue-on-error: false
|
|
|
|
+
|
|
|
|
+ # - name: Publish
|
|
|
|
+ # if: github.event_name == 'push'
|
|
|
|
+ # uses: peaceiris/actions-gh-pages@v3
|
|
|
|
+ # with:
|
|
|
|
+ # github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
+ # publish_dir: docs
|
|
|
|
+ # force_orphan: true
|
|
|
|
+
|
|
|
|
+ # Single deploy job since we're just deploying
|
|
|
|
+ deploy:
|
|
|
|
+ environment:
|
|
|
|
+ name: github-pages
|
|
|
|
+ url: ${{ steps.deployment.outputs.page_url }}
|
|
|
|
+ runs-on: windows-latest
|
|
steps:
|
|
steps:
|
|
- name: Checkout
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
uses: actions/checkout@v3
|
|
@@ -34,15 +76,18 @@ jobs:
|
|
rm ../api -Recurse -Force -ErrorAction SilentlyContinue
|
|
rm ../api -Recurse -Force -ErrorAction SilentlyContinue
|
|
$env:DOCFX_SOURCE_BRANCH_NAME="${{ github.ref_name }}"
|
|
$env:DOCFX_SOURCE_BRANCH_NAME="${{ github.ref_name }}"
|
|
docfx docfx.json
|
|
docfx docfx.json
|
|
- continue-on-error: false
|
|
|
|
|
|
+ continue-on-error: false
|
|
|
|
|
|
- - name: Publish
|
|
|
|
- if: github.event_name == 'push'
|
|
|
|
- uses: peaceiris/actions-gh-pages@v3
|
|
|
|
|
|
+ - name: Setup Pages
|
|
|
|
+ uses: actions/configure-pages@v3
|
|
|
|
+ - name: Upload artifact
|
|
|
|
+ uses: actions/upload-pages-artifact@v2
|
|
with:
|
|
with:
|
|
- github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- publish_dir: docs
|
|
|
|
- force_orphan: true
|
|
|
|
|
|
+ # Upload entire repository
|
|
|
|
+ path: 'docs'
|
|
|
|
+ - name: Deploy to GitHub Pages
|
|
|
|
+ id: deployment
|
|
|
|
+ uses: actions/deploy-pages@v2
|
|
|
|
|
|
# - name: Use docfx to build API Docs
|
|
# - name: Use docfx to build API Docs
|
|
# uses: nikeee/[email protected]
|
|
# uses: nikeee/[email protected]
|