From 75e31848de63cb7e028e9868e36988a12ab240cc Mon Sep 17 00:00:00 2001 From: "Gustavo \"Guz\" L. de Mello" Date: Thu, 23 May 2024 16:42:26 -0300 Subject: [PATCH] fix(ci): setup node and pnpm --- .github/workflows/deploy-preview.yml | 13 ++++++++++++- .github/workflows/deploy.yml | 8 ++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 7229f18..e173f44 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -14,15 +14,26 @@ jobs: name: Deploy preview if: ${{ github.repository == 'dot013/.www-new' }} runs-on: ubuntu-latest + strategy: + matrix: + node-version: [20] steps: - name: Checkout uses: actions/checkout@v3 - - name: Setup go + - name: Setup pnpm + uses: pnpm/action-setup@v3 + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + - name: Setup Go uses: actions/setup-go@v5 with: go-version: '1.22.2' - name: Build run: | + pnpm install go install github.com/a-h/templ/cmd/templ@latest make build-vercel - name: Deploy diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5567c57..417ce59 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,12 +13,20 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + - name: Setup pnpm + uses: pnpm/action-setup@v3 + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'pnpm' - name: Setup go uses: actions/setup-go@v5 with: go-version: '1.22.2' - name: Build run: | + pnpm install go install github.com/a-h/templ/cmd/templ@latest make build-vercel - name: Deploy