From 1d4239d463c0d08372d6467955fcea7beb0ef64d Mon Sep 17 00:00:00 2001 From: Giovanni Mugelli Date: Wed, 14 Feb 2024 17:29:59 +0100 Subject: [PATCH] Remove unused steps in Next.js workflow and delete unnecessary workflows --- .github/workflows/nextjs.yml | 2 - .github/workflows/publish.yml | 52 ------------------------- .github/workflows/setup-node/action.yml | 22 ----------- 3 files changed, 76 deletions(-) delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/setup-node/action.yml diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index d155ade..d3cc927 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -75,8 +75,6 @@ jobs: run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} - name: Build with Next.js run: ${{ steps.detect-package-manager.outputs.runner }} next build - - name: Static HTML export with Next.js - run: ${{ steps.detect-package-manager.outputs.runner }} next export - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index b0e0d66..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,52 +0,0 @@ -# File: .github/workflows/publish.yml -name: publish-to-github-pages -on: - push: - branches: - - main - -permissions: - contents: read - pages: write - id-token: write - -concurrency: - group: "pages" - cancel-in-progress: false - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v4 - - - name: Setup Node.js ⚙️ - Cache dependencies ⚡ - Install dependencies 🔧 - uses: ./.github/workflows/setup-node - - - name: Setup Pages ⚙️ - uses: actions/configure-pages@v4 - with: - static_site_generator: next - - - name: Build with Next.js 🏗️ - run: npx next build - - - name: Upload artifact 📡 - uses: actions/upload-pages-artifact@v3 - with: - path: ./dist - - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - - runs-on: ubuntu-latest - needs: build - - steps: - - name: Publish to GitHub Pages 🚀 - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/setup-node/action.yml b/.github/workflows/setup-node/action.yml deleted file mode 100644 index b2b4983..0000000 --- a/.github/workflows/setup-node/action.yml +++ /dev/null @@ -1,22 +0,0 @@ -# File: .github/workflows/setup-node/action.yml -name: setup-node -description: "Setup Node.js ⚙️ - Cache dependencies ⚡ - Install dependencies 🔧" -runs: - using: "composite" - steps: - - name: Setup Node.js ⚙️ - uses: actions/setup-node@v4 - with: - node-version: 20 - - - name: Cache dependencies ⚡ - id: cache_dependencies - uses: actions/cache@v3 - with: - path: node_modules - key: node-modules-${{ hashFiles('package-lock.json') }} - - - name: Install dependencies 🔧 - shell: bash - if: steps.cache_dependencies.outputs.cache-hit != 'true' - run: npm ci