Skip to content

Commit 352f57d

Browse files
committed
fix: 修改为pages命令
1 parent d08fdfe commit 352f57d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/deploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
run: npm install
2323

2424
- name: Build project
25-
run: npm run build # 假设构建输出到 dist 文件夹
25+
run: npm run pages # 假设构建输出到 dist 文件夹
2626

2727
- name: Deploy to GitHub Pages
2828
uses: peaceiris/actions-gh-pages@v3

pages.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const path = require('path');
33

44
// 定义源文件夹和目标文件夹
55
const sourceDir = path.join(__dirname, 'public');
6-
const targetDir = path.join(__dirname, 'docs');
6+
const targetDir = path.join(__dirname, 'dist');
77

88
// 确保目标文件夹存在
99
if (!fs.existsSync(targetDir)) {
@@ -37,4 +37,4 @@ function copyFolderRecursive(source, target) {
3737

3838
// 执行复制
3939
copyFolderRecursive(sourceDir, targetDir);
40-
console.log('All files copied from public to docs!');
40+
console.log('All files copied from public to dist!');

0 commit comments

Comments
 (0)