Skip to content

Commit

Permalink
feat(tools): improve npm cache in pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherPHolder committed Sep 28, 2023
1 parent 6d831d7 commit 1b0a067
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,6 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1

- name: Install dependencies
run: npm install

- name: Build Dev
run: npm run build

- name: Deploy Dev Client
if: ${{ env.is-pull-request == 'true' }}
run: npx nx affected --target=deploy --exclude='*,!tag:frontend' --environment=dev
Expand All @@ -186,25 +180,30 @@ jobs:

steps:
- uses: actions/checkout@v3

with:
fetch-depth: 0
- uses: nrwl/nx-set-shas@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm

- name: Cache NPM Dependencies
uses: actions/cache@v3
with:
path: |
node_modules
~/.cache
dist
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1

- name: Install dependencies
run: npm install

- name: Build Dev
run: npm run build

- name: Deploy Dev Server
if: ${{ env.is-pull-request == 'true' }}
run: npx nx affected --target=deploy --exclude='*,!tag:backend' --environment=dev
Expand Down

0 comments on commit 1b0a067

Please sign in to comment.