From f8234567783e1043854c409756f9f4c0c12a3a2f Mon Sep 17 00:00:00 2001 From: teach310 Date: Mon, 6 Nov 2023 11:40:51 +0900 Subject: [PATCH 1/2] add command docs/build --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) 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 From c3c0654d80e82bd809b469bfecbdca1536aedfb3 Mon Sep 17 00:00:00 2001 From: teach310 Date: Mon, 6 Nov 2023 11:41:23 +0900 Subject: [PATCH 2/2] add workflow publish_docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 参考 https://docs.github.com/ja/pages/getting-started-with-github-pages/using-custom-workflows-with-github-pages#configuring-the-configure-pages-action https://docs.github.com/ja/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idneeds --- .github/workflows/publish_docs.yml | 43 ++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/publish_docs.yml 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