Skip to content

Commit

Permalink
use pnpm in deploy scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ickynavigator committed Jul 20, 2024
1 parent d986456 commit 8d4f516
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/dev-cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,27 @@ jobs:
with:
node-version: '20'

- name: Cache npm modules
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-npm-
${{ runner.os }}-pnpm-
- name: Install npm
run: npm install -g npm@9
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Install dependencies
run: npm install
run: pnpm install

- name: Lint code
run: npm run lint
run: pnpm lint

- name: Build project
run: npm run build
run: pnpm build

deploy:
runs-on: ubuntu-latest
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/prod-cicd.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Production CI/CD Pipeline

on:
Expand All @@ -25,25 +24,27 @@ jobs:
with:
node-version: '20'

- name: Cache npm modules
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-npm-
${{ runner.os }}-pnpm-
- name: Install npm
run: npm install -g npm@9
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Install dependencies
run: npm install
run: pnpm install

- name: Lint code
run: npm run lint
run: pnpm run lint

- name: Build project
run: npm run build
run: pnpm run build

deploy:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 8d4f516

Please sign in to comment.