Skip to content

Commit e194d21

Browse files
committed
fix deployment build issue
1 parent 9e46bac commit e194d21

2 files changed

Lines changed: 29 additions & 18 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,50 @@ name: Deploy to GitHub Pages
22

33
on:
44
push:
5-
branches:
6-
- main
5+
branches: [ main ]
6+
workflow_dispatch:
77

88
permissions:
9-
contents: write
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
1016

1117
jobs:
12-
deploy:
18+
build:
1319
runs-on: ubuntu-latest
1420

1521
steps:
16-
- name: Checkout Repository
22+
- name: Checkout repository
1723
uses: actions/checkout@v4
1824

1925
- name: Setup Node.js
2026
uses: actions/setup-node@v4
2127
with:
22-
node-version: 18
23-
cache: yarn
28+
node-version: 20
2429

25-
- name: Install Dependencies
26-
run: yarn install
30+
- name: Install dependencies
31+
run: yarn install --frozen-lockfile
2732

28-
- name: Build Project
33+
- name: Build static site
2934
run: yarn build
3035

31-
- name: Add .nojekyll
32-
run: touch out/.nojekyll
36+
- name: Upload artifact
37+
uses: actions/upload-pages-artifact@v3
38+
with:
39+
path: ./out
40+
41+
deploy:
42+
environment:
43+
name: github-pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
runs-on: ubuntu-latest
46+
needs: build
3347

48+
steps:
3449
- name: Deploy to GitHub Pages
35-
uses: JamesIves/github-pages-deploy-action@v4
36-
with:
37-
branch: gh-pages
38-
folder: out
50+
id: deployment
51+
uses: actions/deploy-pages@v4

next.config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import type { NextConfig } from 'next';
22

3-
const isProd = process.env.NODE_ENV ==='production';
4-
53
const nextConfig: NextConfig = {
64
/* config options here */
75
output: 'export',

0 commit comments

Comments
 (0)