From bdc84d6af23124df2a5edb87442286df1e115ec1 Mon Sep 17 00:00:00 2001 From: smallfu6 Date: Tue, 15 Oct 2024 20:38:38 +0800 Subject: [PATCH] feat: auto deploy translations --- .github/workflows/deploy-to-gitbook.yml | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/deploy-to-gitbook.yml diff --git a/.github/workflows/deploy-to-gitbook.yml b/.github/workflows/deploy-to-gitbook.yml new file mode 100644 index 0000000..222f000 --- /dev/null +++ b/.github/workflows/deploy-to-gitbook.yml @@ -0,0 +1,32 @@ +name: Deploy to GitBook + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Switch dir + uses: cd ./translation + + - name: Install GitBook CLI + run: | + npm install -g gitbook-cli + gitbook install + + - name: Build GitBook + run: gitbook build + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./translations/_book +