From 1fa4d7f1efd26984f2d9769e4bd4d966cf7316dd Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Tue, 19 Nov 2019 15:01:33 +0800 Subject: [PATCH] Update workflows config. --- .github/workflows/ci.yml | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33254d826c..8d49023e57 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,17 +1,33 @@ name: GitHub Actions Build and Deploy linux-command -on: [push] +on: + push: + branches: + - master jobs: - build-and-deploy: - runs-on: ubuntu-latest + build-deploy: + runs-on: ubuntu-18.04 steps: - - name: Checkout - uses: actions/checkout@master + - uses: actions/checkout@master + + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: '10.x' + + # - name: Cache dependencies + # uses: actions/cache@v1 + # with: + # path: ~/.npm + # key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + # restore-keys: | + # ${{ runner.os }}-node- + + - run: npm install + - run: npm run start - name: Build and Deploy - uses: JamesIves/github-pages-deploy-action@master + uses: peaceiris/actions-gh-pages@v2.5.0 env: - ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} - BASE_BRANCH: master - BRANCH: gh-pages - FOLDER: .deploy - BUILD_SCRIPT: npm install && npm run build + ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} + PUBLISH_BRANCH: gh-pages + PUBLISH_DIR: ./.deploy