From 864037a6e986724deef9b19390a40ca49fe42b6d Mon Sep 17 00:00:00 2001 From: Dave Date: Mon, 15 Sep 2025 10:51:20 +0200 Subject: [PATCH] using pnpm for ci/cd --- .gitea/workflows/deploy.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 6353a1b..af348ae 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -1,4 +1,4 @@ -name: Build and Deploy Next.js Site +name: Build and Deploy DAVE | DMG on: push: @@ -16,27 +16,28 @@ jobs: uses: actions/setup-node@v4 with: node-version: '18' - cache: 'npm' + cache: 'pnpm' - - name: Cache Next.js build + - name: Install pnpm + run: npm install -g pnpm + + - name: Cache pnpm store uses: actions/cache@v4 with: - path: | - ~/.npm - ${{ github.workspace }}/.next/cache - key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} + path: ~/.pnpm-store + key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | - ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}- + ${{ runner.os }}-pnpm- - name: Disable Next.js telemetry run: npx next telemetry disable - name: Install dependencies - run: npm ci + run: pnpm install --frozen-lockfile - name: Build and deploy run: | mv src/app/\(cms\) src/app/_cms - npm run build + pnpm run build rm -rf /var/www/sites/dave-dmg/blog/* cp -r out/* /var/www/sites/dave-dmg/blog/ \ No newline at end of file