From 5cf8a98d499fd92388dd2b7df01b26d83815098a Mon Sep 17 00:00:00 2001 From: netpyoung Date: Fri, 12 Jan 2024 23:45:41 +0900 Subject: [PATCH] add: github action - deploy.yaml --- .github/workflows/deploy.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/deploy.yaml diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..1db5975 --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,28 @@ +name: Build and deploy GH Pages + +## ref: https://github.com/peaceiris/actions-mdbook + +on: + push: + branches: + - main + +jobs: + build: + name: Publish site + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v4 + - name: Setup mdBook + uses: peaceiris/actions-mdbook@v1 + - name: Build mdBook + run: | + mdbook build + touch ./book/.nojekyll + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.ref == 'refs/heads/main' }} + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./book \ No newline at end of file