From f40613c2149ca94a88689c686d95d414077f0a44 Mon Sep 17 00:00:00 2001 From: Andy Rothwell Date: Wed, 29 Nov 2023 16:05:37 -0500 Subject: [PATCH 1/2] uses caching in push to s3 --- .github/workflows/dev_push_to_s3.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dev_push_to_s3.yml b/.github/workflows/dev_push_to_s3.yml index 4facdc6..7a04d4f 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: - - main + - node-cache jobs: build: @@ -14,16 +14,23 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Use Node.js 12.x - uses: actions/setup-node@v1 + - uses: actions/checkout@v3 + + - name: Use Node.js 16.x + uses: actions/setup-node@v3 with: - node-version: '12.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 env: FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.FA_AUTH_TOKEN }} From 44667e377dcf69b05a8282e9cd90a05c95a1316a Mon Sep 17 00:00:00 2001 From: Andy Rothwell Date: Wed, 29 Nov 2023 16:18:18 -0500 Subject: [PATCH 2/2] sets up same push for prod --- .github/workflows/prod_push_to_s3.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/prod_push_to_s3.yml b/.github/workflows/prod_push_to_s3.yml index 61f76bc..8ce7437 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 12.x - uses: actions/setup-node@v1 + - uses: actions/checkout@v3 + + - name: Use Node.js 16.x + uses: actions/setup-node@v3 with: - node-version: '12.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 env: FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.FA_AUTH_TOKEN }}