From d50ee20f4e6c22d88f3635940ffb2645341211dd Mon Sep 17 00:00:00 2001 From: Blank Date: Thu, 5 Dec 2024 21:19:17 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=A2=9E=E5=8A=A0]1.=20=E5=A2=9E=E5=8A=A0Docf?= =?UTF-8?q?x=20=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docs-publish.yml | 36 ++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/docs-publish.yml diff --git a/.github/workflows/docs-publish.yml b/.github/workflows/docs-publish.yml new file mode 100644 index 00000000..ad0f0755 --- /dev/null +++ b/.github/workflows/docs-publish.yml @@ -0,0 +1,36 @@ +name: Publish Docs + +on: + push: + branches: + - "src" + tags: + - "*" + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup .NET Core + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 8.0.x + + - name: Install DocFX + run: | + dotnet tool install -g docfx + echo "$HOME/.dotnet/tools" >> $GITHUB_PATH + + - name: Build Documentation + run: docfx build ./docs/docfx.json + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/_site