Skip to content

Commit

Permalink
Fix build 5
Browse files Browse the repository at this point in the history
  • Loading branch information
arnavbhate committed Oct 10, 2024
1 parent a10989c commit 3728a4f
Show file tree
Hide file tree
Showing 5 changed files with 3,752 additions and 2,113 deletions.
28 changes: 13 additions & 15 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Detect package manager
id: detect-package-manager
run: |
Expand All @@ -49,24 +50,21 @@ jobs:
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
exit 0
else
echo "Unable to determine packager manager"
echo "Unable to determine package manager"
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "20"
cache: ${{ steps.detect-package-manager.outputs.manager }}

- name: Setup Pages
uses: actions/configure-pages@v2
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).
#
# You may remove this line if you want to manage the configuration yourself.
static_site_generator: next
uses: actions/configure-pages@v4

- name: Restore cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
.next/cache
Expand All @@ -75,15 +73,15 @@ 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: ${{ 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@v1
uses: actions/upload-pages-artifact@v3
with:
path: ./out

Expand All @@ -97,4 +95,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v4
5 changes: 5 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ let nextConfig = {
reactStrictMode: true,
swcMinify: true,
trailingSlash: true,
output: "export",
basePath: "/",
images: {
unoptimized: true,
},
};

// Required for setting up github pages
Expand Down
Loading

0 comments on commit 3728a4f

Please sign in to comment.