Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
WindyDante authored Oct 11, 2024
1 parent f591fea commit 27e5aee
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3 # 更新为 v3
uses: actions/checkout@v3
with:
fetch-depth: 0 # 确保拉取完整的提交历史

- name: Set up Node.js
uses: actions/setup-node@v3 # 更新为 v3
uses: actions/setup-node@v3
with:
node-version: '16'

Expand All @@ -27,8 +29,15 @@ jobs:
- name: Build project
run: npm run build

- name: Verify docs directory exists
run: |
if [ ! -d "docs" ]; then
echo "docs directory not found."
exit 1
fi
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # 部署到 gh-pages 分支
folder: docs # 部署 dist 文件夹
folder: docs # 确保你要部署的文件夹

0 comments on commit 27e5aee

Please sign in to comment.