From 7fa86ea953e75f4b8a68a11bf9f082c61a96e658 Mon Sep 17 00:00:00 2001 From: chai2010 Date: Thu, 4 Aug 2022 14:16:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE.md | 1 + .github/PULL_REQUEST_TEMPLATE.md | 1 + .github/workflows/book.yml | 36 ++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/workflows/book.yml diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..d30af59 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1 @@ +提示:哪一章节的问题,建议如何修改 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..167f641 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1 @@ +提示:解决了什么问题,也可以讲下理由。 diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml new file mode 100644 index 0000000..fc66c0c --- /dev/null +++ b/.github/workflows/book.yml @@ -0,0 +1,36 @@ +name: mdbook +on: + push: + branches: + - main + - master + - "releases/*" + pull_request: + branches: + - main + - master + types: + - closed +jobs: + deploy: + runs-on: ubuntu-18.04 + steps: + - name: Git checkout + uses: actions/checkout@v2 + + - name: Setup mdBook + uses: peaceiris/actions-mdbook@v1 + with: + mdbook-version: '0.4.10' + # mdbook-version: 'latest' + + - run: mdbook build + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + personal_token: ${{ secrets.DEPLOY_KEY }} + publish_dir: ./book + publish_branch: gh-pages + user_name: 'github-actions[bot]' + user_email: 'github-actions[bot]@users.noreply.github.com'