From 50715f7d75add72a3f02ca72a61670f2c92aaac2 Mon Sep 17 00:00:00 2001 From: Asaf Korem Date: Sun, 3 Nov 2024 20:38:45 +0200 Subject: [PATCH] chore: update configs --- .github/workflows/deploy.yml | 17 +++++++---------- next.config.ts | 3 +-- package.json | 3 ++- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8b0230f..d248f75 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,23 +21,20 @@ jobs: node-version: '18' cache: 'npm' - - name: Enable NPM Debugging - run: echo "export DEBUG=npm:*" >> $GITHUB_ENV - - - name: Update npm - run: npm install -g npm@latest - - - name: Clear npm cache - run: npm cache clean --force - - name: Install Dependencies - run: npm ci --loglevel verbose + run: npm ci - name: Build run: npm run build + env: + NEXT_PUBLIC_BASE_PATH: '/git-spotlight' # Add if your repo name is git-spotlight + + - name: Add .nojekyll file + run: touch ./out/.nojekyll - name: Deploy 🚀 uses: JamesIves/github-pages-deploy-action@v4 with: folder: out branch: gh-pages + clean: true # Automatically remove deleted files from the deploy branch diff --git a/next.config.ts b/next.config.ts index 617e466..871eae5 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,11 +1,10 @@ /** @type {import('next').NextConfig} */ const nextConfig = { output: 'export', + basePath: '/git-spotlight', // Should match your repository name images: { unoptimized: true, }, - basePath: '', - trailingSlash: true, } module.exports = nextConfig diff --git a/package.json b/package.json index 1617b9f..25b637a 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "start": "next start", "lint": "next lint", "export": "next build && next export", - "deploy": "npm run build && touch out/.nojekyll" + "deploy": "npm run build && touch out/.nojekyll", + "serve": "npx serve out" }, "dependencies": { "class-variance-authority": "^0.7.0",