From 95f80a451b82f01561797e858244e753529491b2 Mon Sep 17 00:00:00 2001 From: yun-cheng Date: Fri, 22 Mar 2024 15:31:38 +0800 Subject: [PATCH] fix(deploy): configure node and pnpm in GitHub Actions for proper project build --- .github/workflows/firebase-hosting-merge.yml | 8 ++++++++ .github/workflows/firebase-hosting-pull-request.yml | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml index 069d180..d22c9de 100644 --- a/.github/workflows/firebase-hosting-merge.yml +++ b/.github/workflows/firebase-hosting-merge.yml @@ -11,6 +11,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v3 + with: + version: 8 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'pnpm' + - run: pnpm install && pnpm build - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: '${{ secrets.GITHUB_TOKEN }}' diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index d3a1c09..5270fd9 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -13,6 +13,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v3 + with: + version: 8 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'pnpm' + - run: pnpm install && pnpm build - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: '${{ secrets.GITHUB_TOKEN }}'