Skip to content

Commit

Permalink
Updating actions to use setup-node@v3 and npx lerna
Browse files Browse the repository at this point in the history
  • Loading branch information
underbluewaters committed Jul 5, 2023
1 parent 95c88f3 commit 7cc80e6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 67 deletions.
20 changes: 3 additions & 17 deletions .github/workflows/deploy-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,24 +65,10 @@ jobs:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: "18.6"
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-server-deploy-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: |
node_modules
*/*/node_modules
~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
cache: "npm"
- name: Install lerna
run: |
npm install
Expand All @@ -91,7 +77,7 @@ jobs:
npm install -g aws-cdk typescript
- name: Install dependencies
run: |
lerna bootstrap --scope=infra
npx lerna bootstrap --scope=infra
- name: Deploy server
working-directory: ./packages/infra
env:
Expand Down
38 changes: 5 additions & 33 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,24 +119,10 @@ jobs:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: "18.6"
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-server-deploy-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: |
node_modules
*/*/node_modules
~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
cache: "npm"
- name: Install lerna
run: |
npm install
Expand All @@ -145,7 +131,7 @@ jobs:
npm install -g aws-cdk typescript
- name: Install dependencies
run: |
lerna bootstrap --scope=infra
npx lerna bootstrap --scope=infra
- name: Deploy server
working-directory: ./packages/infra
env:
Expand Down Expand Up @@ -180,27 +166,13 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: "18.6"
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-client-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: |
node_modules
*/*/node_modules
~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
cache: "npm"
- name: Install lerna
run: |
npm install
- name: Install dependencies
run: |
lerna bootstrap
npx lerna bootstrap
- name: Build client
working-directory: ./packages/client
env:
Expand Down
20 changes: 3 additions & 17 deletions .github/workflows/preview-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,16 @@ jobs:
url: ${{ steps.wrangler.outputs.preview_url }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: "18.6"
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-client-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: |
node_modules
*/*/node_modules
~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
cache: "npm"
- name: Install lerna
run: |
npm install
- name: Install dependencies
run: |
lerna bootstrap
npx lerna bootstrap
- name: Build client
working-directory: ./packages/client
env:
Expand Down

0 comments on commit 7cc80e6

Please sign in to comment.