Skip to content

Commit

Permalink
Merge pull request #47 from CityOfPhiladelphia/main
Browse files Browse the repository at this point in the history
sets up npm caching in prod push
  • Loading branch information
ajrothwell authored Nov 30, 2023
2 parents 5b3a1a5 + 995faf7 commit 17eb8c4
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 14 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/dev_push_to_s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/prod_push_to_s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 17eb8c4

Please sign in to comment.