From fda2f5544baebe0e55bb5e7e2073d59c49240a83 Mon Sep 17 00:00:00 2001 From: jtarrosa Date: Mon, 2 Oct 2023 22:32:17 +0800 Subject: [PATCH] Feat: use yarn rather npm --- .github/workflows/node.js.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index ada0c2c..c78cb58 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,7 +1,4 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - -name: Node.js CI +name: Build and Deploy Page on: push: @@ -24,13 +21,13 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run build --if-present - - run: npm test + cache: 'yarn' # Cache Yarn dependencies + - run: yarn install # Use Yarn for dependency installation + - run: yarn build --if-present # Use Yarn for building + - run: yarn test # Use Yarn for running tests - name: Deploy with gh-pages run: | git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git - npm run deploy -- -u "github-actions-bot " + yarn run deploy -- -u "github-actions-bot " env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}