From ce5c3b1cfffb2fb35a0f5ee909f1a8c01bc3eeb5 Mon Sep 17 00:00:00 2001 From: James Blair Date: Sun, 30 Jun 2024 09:22:18 +1200 Subject: [PATCH] Cleanup on github actions deploy workflow. --- .github/workflows/nextjs.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index e9c7460..84b66f9 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -5,9 +5,6 @@ on: push: branches: ["main"] - # Allows you to run this workflow manually from the actions tab - workflow_dispatch: - # Sets permissions of the GITHUB_TOKEN to allow deployment to gitHub pages permissions: contents: read @@ -26,17 +23,15 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: Setup node uses: actions/setup-node@v4 with: node-version: "20" cache: "npm" + - name: Setup pages uses: actions/configure-pages@v5 - with: - # Automatically inject basePath in your Next.js configuration file and disable - # server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized). - static_site_generator: next - name: Restore cache uses: actions/cache@v4 with: @@ -47,12 +42,16 @@ jobs: # If source files changed but packages didn't, rebuild from a prior cache. restore-keys: | ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}- + - name: Install dependencies run: npm install + - name: Build with next.js run: npm run build + - name: nojekyll run: touch ./out/.nojekyll + - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: