From 4026c02689a224609d2cee333be95f1767fca788 Mon Sep 17 00:00:00 2001 From: znc15 <64775575+znc15@users.noreply.github.com> Date: Sun, 24 Sep 2023 22:33:49 +0800 Subject: [PATCH] Update deploy-docs.yml --- .github/workflows/deploy-docs.yml | 42 +++++++++++++------------------ 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index b34942e..c2c4c56 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -1,25 +1,17 @@ -#!/usr/bin/env sh - -# 确保脚本抛出遇到的错误 -set -e - -# 生成静态文件 -pnpm docs:build - -# 进入生成的文件夹 -cd docs/.vuepress/dist - -# 如果是发布到自定义域名 -# echo 'www.example.com' > CNAME - -git init -git add -A -git commit -m 'deploy' - -# 如果发布到 https://.github.io -git push -f git@github.com:lms-work.github.io.git master - -# 如果发布到 https://.github.io/ -# git push -f git@github.com:/.git master:gh-pages - -cd - +name: Build and Deploy +on: [push] +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@master + + - name: vuepress-deploy + uses: jenkey2011/vuepress-deploy@master + env: + ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} + TARGET_REPO: lms-work/wiki-docs + TARGET_BRANCH: master + BUILD_SCRIPT: yarn && yarn docs:build + BUILD_DIR: src/.vuepress/dist