Skip to content

Commit

Permalink
fix: setup pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
BostonRohan committed Apr 6, 2024
1 parent cf457f1 commit 40c7c3b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,28 @@ jobs:
deploy:
runs-on: ubuntu-latest
environment: production

steps:
- name: 🏪 Checkout repo
uses: actions/checkout@v4

- uses: pnpm/action-setup@v3
name: 🏠 Setup pnpm
with:
run_install: false

- name: 📁 Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: 👷‍♂️ Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: 🖥️ Install dependencies
run: pnpm install

Expand Down
19 changes: 18 additions & 1 deletion .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,28 @@ jobs:
deploy:
runs-on: ubuntu-latest
environment: preview

steps:
- name: 🏪 Checkout repo
uses: actions/checkout@v4

- uses: pnpm/action-setup@v3
name: 🏠 Setup pnpm
with:
run_install: false

- name: 📁 Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: 👷‍♂️ Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: 🖥️ Install dependencies
run: pnpm install

Expand Down

0 comments on commit 40c7c3b

Please sign in to comment.