diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e288d40..f2a4e63 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,8 +27,16 @@ jobs: - name: Build project run: npm run build + # 确保docs目录存在 + - 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 # 使用最新版本的 GitHub Pages 部署 Action + uses: JamesIves/github-pages-deploy-action@v4 with: - branch: gh-pages # GitHub Pages 部署到 gh-pages 分支 - folder: dist # 构建输出的文件夹 + branch: master + folder: docs # 部署 docs 文件夹