diff --git a/.github/workflows/publish_docs.yml b/.github/workflows/publish_docs.yml new file mode 100644 index 0000000..4c8a9de --- /dev/null +++ b/.github/workflows/publish_docs.yml @@ -0,0 +1,43 @@ +name: Deploy Document with GitHub Pages + +on: + push: + branches: + - main + workflow_dispatch: + +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v3 + - uses: actions/setup-dotnet@v3 + with: + dotnet-version: 7.0.x + - run: dotnet tool restore + - name: Build docs + run: make docs/build + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: docs + path: docs/_site + deploy: + permissions: + id-token: write + pages: write + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: peaceiris/actions-gh-pages@v3 diff --git a/Makefile b/Makefile index 9573ba6..6f70e0d 100644 --- a/Makefile +++ b/Makefile @@ -34,3 +34,7 @@ plugins/build: .PHONY: docs/clean docs/clean: rm -rf ./docs/_site + +.PHONY: docs/build +docs/build: + dotnet docfx docs/docfx.json