From 7fbe2646453f01e123a913b53b6fe81ac71beef0 Mon Sep 17 00:00:00 2001 From: Clem Flory Date: Mon, 19 Feb 2024 02:35:41 -0600 Subject: [PATCH] use setup-node for npm caching --- .github/workflows/firebase-hosting-merge.yml | 5 +++++ .github/workflows/firebase-hosting-pull-request.yml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml index 6d0eeef..bd3fdad 100644 --- a/.github/workflows/firebase-hosting-merge.yml +++ b/.github/workflows/firebase-hosting-merge.yml @@ -11,6 +11,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "npm" + cache-dependency-path: hosting/package-lock.json - run: cd hosting && npm ci - run: cd hosting && node_modules/.bin/nx build - uses: FirebaseExtended/action-hosting-deploy@v0 diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index d8cf112..8beeefa 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -13,6 +13,11 @@ jobs: pull-requests: write steps: - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "npm" + cache-dependency-path: hosting/package-lock.json - run: cd hosting && npm ci - run: cd hosting && node_modules/.bin/nx lint - run: cd hosting && node_modules/.bin/nx test