Skip to content

Commit 5e851a8

Browse files
committed
增强GitHub Actions工作流:添加详细日志输出、NPM配置和切换到peaceiris/actions-gh-pages
1 parent 76b5d67 commit 5e851a8

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

.github/workflows/deploy.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,32 @@ jobs:
2323
node-version: '20'
2424
cache: 'npm'
2525

26+
- name: 显示Node和NPM版本
27+
run: |
28+
node -v
29+
npm -v
30+
31+
- name: 配置NPM
32+
run: |
33+
npm config set legacy-peer-deps true
34+
npm config set fetch-retries 3
35+
npm config set fetch-retry-mintimeout 5000
36+
npm config set fetch-retry-maxtimeout 60000
37+
2638
- name: 安装依赖
27-
run: npm install
39+
run: npm install --no-fund --no-audit --verbose
40+
41+
- name: 查看目录结构
42+
run: ls -la
43+
44+
- name: 列出包含的依赖
45+
run: npm list --depth=0
2846

2947
- name: 构建
3048
run: npm run build
3149

3250
- name: 部署到GitHub Pages
33-
uses: JamesIves/github-pages-deploy-action@v4
51+
uses: peaceiris/actions-gh-pages@v3
3452
with:
35-
folder: dist
36-
branch: gh-pages
37-
clean: true
53+
github_token: ${{ secrets.GITHUB_TOKEN }}
54+
publish_dir: ./dist

0 commit comments

Comments
 (0)