From a7c717c4ada08a46ac77d2507efb09c70f6a6e25 Mon Sep 17 00:00:00 2001 From: "andy.rothwell" Date: Thu, 30 Nov 2023 13:06:18 -0500 Subject: [PATCH 1/2] sets up npm caching in dev and prod pushes --- .github/workflows/dev_push_to_s3.yml | 17 ++++++++++++----- .github/workflows/prod_push_to_s3.yml | 17 ++++++++++++----- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.github/workflows/dev_push_to_s3.yml b/.github/workflows/dev_push_to_s3.yml index 61fec96..c8a96bc 100644 --- a/.github/workflows/dev_push_to_s3.yml +++ b/.github/workflows/dev_push_to_s3.yml @@ -14,16 +14,23 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Use Node.js 14.x - uses: actions/setup-node@v1 + - uses: actions/checkout@v3 + + - name: Use Node.js 16.x + uses: actions/setup-node@v3 with: - node-version: '14.x' + node-version: '16.x' + cache: 'npm' + + - name: install npm 6 + run: | + npm install -g npm@6 - name: npm install, and build run: | printf "@fortawesome:registry=https://npm.fontawesome.com/\n//npm.fontawesome.com/:_authToken=${FONTAWESOME_NPM_AUTH_TOKEN}" >> ~/.npmrc - npm install + git config --global url."https://".insteadOf ssh:// + npm ci npm run build:development env: FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.FA_AUTH_TOKEN }} diff --git a/.github/workflows/prod_push_to_s3.yml b/.github/workflows/prod_push_to_s3.yml index f8d0525..458987b 100644 --- a/.github/workflows/prod_push_to_s3.yml +++ b/.github/workflows/prod_push_to_s3.yml @@ -14,16 +14,23 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Use Node.js 14.x - uses: actions/setup-node@v1 + - uses: actions/checkout@v3 + + - name: Use Node.js 16.x + uses: actions/setup-node@v3 with: - node-version: '14.x' + node-version: '16.x' + cache: 'npm' + + - name: install npm 6 + run: | + npm install -g npm@6 - name: npm install, and build run: | printf "@fortawesome:registry=https://npm.fontawesome.com/\n//npm.fontawesome.com/:_authToken=${FONTAWESOME_NPM_AUTH_TOKEN}" >> ~/.npmrc - npm install + git config --global url."https://".insteadOf ssh:// + npm ci npm run build:production env: FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.FA_AUTH_TOKEN }} From 9e2a70024f6146e5ef0fd4ecab3e3da6e19e0575 Mon Sep 17 00:00:00 2001 From: "andy.rothwell" Date: Thu, 30 Nov 2023 13:07:24 -0500 Subject: [PATCH 2/2] fixes branch in push file --- .github/workflows/dev_push_to_s3.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dev_push_to_s3.yml b/.github/workflows/dev_push_to_s3.yml index c8a96bc..c11254b 100644 --- a/.github/workflows/dev_push_to_s3.yml +++ b/.github/workflows/dev_push_to_s3.yml @@ -6,7 +6,7 @@ name: dev Push to S3 on: push: branches: - - pinboard-features + - main jobs: build: