Skip to content

Commit e437a78

Browse files
authored
Modify git add command in build workflow
Update build process to only add .next directory to git.
1 parent 482b2b4 commit e437a78

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/build-to-branch.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,16 @@ jobs:
7777
# 把 build 产物拷进去(按需修改)
7878
cp -r .next/* .
7979
80+
# 清理缓存
81+
rm -rf .next/cache
82+
8083
# 如果你还有 public / package.json / next.config.js
8184
# cp -r public .
8285
# cp package.json next.config.js .
8386
8487
# copy .gitignore
8588
cp /tmp/gitignore.tmp .gitignore
8689
87-
git add .
90+
git add .next
8891
git commit -m "chore: build from $GITHUB_SHA"
8992
git push -f origin build

0 commit comments

Comments
 (0)