Skip to content

Commit

Permalink
fix: failing build with ERR_PNPM_BAD_PM_VERSION
Browse files Browse the repository at this point in the history
- due to multiple pnpm versions found in actions and packageManager in package.json
  • Loading branch information
abetoots committed Aug 27, 2024
1 parent 6a66c3b commit 454f79f
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ jobs:
- name: Install pnpm package manager
uses: pnpm/action-setup@v4
with:
version: 8
run_install: false

- name: ⎔ Setup node
Expand Down Expand Up @@ -168,8 +167,7 @@ jobs:
uses: actions/cache@v4
with:
path: apps/web/prisma/data.db
key:
db-cache-schema_${{ hashFiles('./apps/web/prisma/schema.prisma')
key: db-cache-schema_${{ hashFiles('./apps/web/prisma/schema.prisma')
}}-migrations_${{
hashFiles('./apps/web/prisma/migrations/*/migration.sql') }}

Expand Down Expand Up @@ -197,8 +195,7 @@ jobs:
build-web:
name: 🐳 Build
# only build/deploy main and staging branch on pushes
if:
${{ (github.ref == 'refs/heads/main' || github.ref ==
if: ${{ (github.ref == 'refs/heads/main' || github.ref ==
'refs/heads/staging') && github.event_name == 'push' }}
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -236,8 +233,8 @@ jobs:
uses: SebRollen/[email protected]
id: read_toml
with:
file: 'apps/web/fly.toml'
field: 'app'
file: "apps/web/fly.toml"
field: "app"

- name: 🐳 Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -264,8 +261,7 @@ jobs:
context: .
file: apps/web/other/Dockerfile
push: true
tags:
registry.fly.io/${{ steps.read_toml.outputs.value }}:${{
tags: registry.fly.io/${{ steps.read_toml.outputs.value }}:${{
github.ref_name }}-${{ github.sha }}
build-args: |
COMMIT_SHA=${{ github.sha }}
Expand Down Expand Up @@ -330,9 +326,9 @@ jobs:
uses: SebRollen/[email protected]
id: read_toml
with:
file: 'apps/web/fly.toml'
file: "apps/web/fly.toml"
# the field in the toml file to read. outputs the value to steps.read_toml.outputs.value
field: 'app'
field: "app"

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -343,8 +339,7 @@ jobs:

- name: 🚀 Deploy Staging
if: ${{ github.ref == 'refs/heads/staging' }}
run:
flyctl deploy --build-arg COMMIT_SHA=${{ github.sha }} --build-arg
run: flyctl deploy --build-arg COMMIT_SHA=${{ github.sha }} --build-arg
STORE_PATH=${{ env.STORE_PATH }} --build-arg PROJECT=web --app ${{
steps.read_toml.outputs.value }}-staging --config ./apps/web/fly.toml
--image registry.fly.io/${{ steps.read_toml.outputs.value }}:${{
Expand All @@ -357,8 +352,7 @@ jobs:

- name: 🚀 Deploy Production
if: ${{ github.ref == 'refs/heads/main' }}
run:
flyctl deploy --build-arg COMMIT_SHA=${{ github.sha }} --build-arg
run: flyctl deploy --build-arg COMMIT_SHA=${{ github.sha }} --build-arg
STORE_PATH=${{ env.STORE_PATH }} --build-arg PROJECT=web --app ${{
steps.read_toml.outputs.value }} --config ./apps/web/fly.toml --image
registry.fly.io/${{ steps.read_toml.outputs.value }}:${{
Expand Down

0 comments on commit 454f79f

Please sign in to comment.