Skip to content

Commit df12c72

Browse files
committed
fix: 🐛 deploy
1 parent 0906d0e commit df12c72

File tree

2 files changed

+16
-37
lines changed

2 files changed

+16
-37
lines changed

.github/workflows/deploy.yml

Lines changed: 15 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
name: Deploy Next.js site to GitHub Pages
1+
name: Deploy Next.js site to Pages
22

33
on:
44
push:
5-
branches:
6-
- "main"
5+
branches: ["main"]
76
workflow_dispatch:
87

98
permissions:
@@ -19,43 +18,23 @@ jobs:
1918
build:
2019
runs-on: ubuntu-latest
2120
steps:
22-
# Checkout the code
23-
- name: Checkout code
24-
uses: actions/checkout@v4
25-
26-
# Setup Node.js environment
27-
- name: Setup Node.js
21+
- uses: actions/checkout@v4
22+
23+
- name: Setup Node
2824
uses: actions/setup-node@v4
2925
with:
3026
node-version: "20"
31-
32-
# Cache npm dependencies to speed up builds
33-
- name: Cache npm dependencies
34-
uses: actions/cache@v3
35-
with:
36-
path: ~/.npm
37-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
38-
restore-keys: |
39-
${{ runner.os }}-node-
40-
41-
# Install dependencies
27+
cache: 'npm'
28+
4229
- name: Install dependencies
43-
run: |
44-
npm ci
45-
npm install sharp # Important for images optimization
46-
47-
# Build the project with Next.js
30+
run: npm ci
31+
32+
- name: Setup Pages
33+
uses: actions/configure-pages@v4
34+
4835
- name: Build with Next.js
49-
run: |
50-
npm run build
51-
52-
# Ensure 'out' directory is created and set '.nojekyll' to avoid conflicts
53-
- name: Prepare output directory
54-
run: |
55-
mkdir -p out
56-
touch out/.nojekyll
57-
58-
# Upload the built site as an artifact
36+
run: npm run build
37+
5938
- name: Upload artifact
6039
uses: actions/upload-pages-artifact@v3
6140
with:
@@ -68,7 +47,6 @@ jobs:
6847
runs-on: ubuntu-latest
6948
needs: build
7049
steps:
71-
# Deploy to GitHub Pages
7250
- name: Deploy to GitHub Pages
7351
id: deployment
74-
uses: actions/deploy-pages@v4
52+
uses: actions/deploy-pages@v4

next.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const nextConfig: NextConfig = {
66
images: {
77
unoptimized: true,
88
},
9+
basePath: '/seminar-visualds.github.io',
910
};
1011

1112
export default nextConfig;

0 commit comments

Comments
 (0)