From efc2a194a3f48b327a97fc05de4484c3a50db59e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E4=BC=A0=E9=BE=99?= Date: Sat, 9 Apr 2022 22:37:44 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E4=BF=AE=E6=94=B9=20github=20actions=20?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 47 ++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index da1e5c5..05ac50e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,35 +1,36 @@ name: deploy -on: [push] - branches: +on: + push: + branches: - main jobs: build-and-deploy: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v2 - - name: use Node.js 16 - uses: actions/setup-node@v2.1.2 - with: - node-version: '16.x' + - name: use Node.js 16 + uses: actions/setup-node@v2.1.2 + with: + node-version: '16.x' - - name: Delete gh-pages branch - run: | - git push origin --delete gh-pages + - name: Delete gh-pages branch + run: | + git push origin --delete gh-pages - - name: Build - run: | - pnpm install - pnpm run build + - name: Build + run: | + pnpm install + pnpm run build - - name: Deploy - uses: peaceiris/actions-gh-pages@v2.5.0 - env: - ACTIONS_DEPLOY_KEY: ${{secrets.ACTIONS_DEPLOY_KEY}} - PUBLISH_BRANCH: gh-pages - PUBLISH_DIR: ./dist - with: - forceOrphan: true \ No newline at end of file + - name: Deploy + uses: peaceiris/actions-gh-pages@v2.5.0 + env: + ACTIONS_DEPLOY_KEY: ${{secrets.ACTIONS_DEPLOY_KEY}} + PUBLISH_BRANCH: gh-pages + PUBLISH_DIR: ./dist + with: + forceOrphan: true