You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: Error: No uploaded artifact was found! Please check if there are any errors at build step, or uploaded artifact name is correct. at getSignedArtifactUrl (/home/runner/work/_actions/actions/deploy-pages/v1/webpack:/deploy-pages/src/api-client.js:93:1) at processTicksAndRejections (node:internal/process/task_queues:95:5) at Deployment.create (/home/runner/work/_actions/actions/deploy-pages/v1/webpack:/deploy-pages/src/deployment.js:53:1) at main (/home/runner/work/_actions/actions/deploy-pages/v1/webpack:/deploy-pages/src/index.js:30:1) Error: Error: No uploaded artifact was found! Please check if there are any errors at build step, or uploaded artifact name is correct.
Error: Error: No uploaded artifact was found! Please check if there are any errors at build step, or uploaded artifact name is correct. at getSignedArtifactUrl (/home/runner/work/_actions/actions/deploy-pages/v1/webpack:/deploy-pages/src/api-client.js:93:1) at processTicksAndRejections (node:internal/process/task_queues:95:5) at Deployment.create (/home/runner/work/_actions/actions/deploy-pages/v1/webpack:/deploy-pages/src/deployment.js:53:1) at main (/home/runner/work/_actions/actions/deploy-pages/v1/webpack:/deploy-pages/src/index.js:30:1) Error: Error: No uploaded artifact was found! Please check if there are any errors at build step, or uploaded artifact name is correct.
deepseek说
这个错误表明 actions/deploy-pages 没有找到上传的构建产物(Artifact)。通常是因为在 actions/upload-pages-artifact 步骤中,指定的路径(path)没有正确生成或上传。
确保在 Upload artifact 步骤之前,构建步骤(例如 pnpm build)成功运行,并且生成了正确的输出文件。
如果构建步骤失败,dist 目录可能为空或不存在,导致上传失败。
解决方法:
检查构建步骤的日志,确保没有错误。
确保构建输出路径(例如 ./dist)是正确的。
确保 actions/upload-pages-artifact 的 path 参数指向正确的目录。
如果构建输出路径不是 ./dist,需要修改 path 参数。
解决方法:
确认构建输出路径。例如,如果构建输出路径是 build,则将 path 修改为 ./build:
解决方法:
确认构建输出路径。例如,如果构建输出路径是 build,则将 path 修改为 ./build:
yaml
复制
uses: actions/upload-pages-artifact@v3
with:
path: './build'
如果构建输出目录不存在,actions/upload-pages-artifact 会失败。
解决方法:
在 Upload artifact 步骤之前,添加一个步骤来检查构建输出目录是否存在:
yaml
复制
run: |
if [ ! -d "./dist" ]; then
echo "Build output directory 'dist' does not exist!"
exit 1
fi
确保构建脚本(例如 pnpm build)正确生成了输出文件。
如果构建脚本没有正确配置,可能会导致输出目录为空。
解决方法:
检查构建脚本的配置,确保它生成了正确的文件。
例如,如果你使用的是 pnpm,可以尝试在本地运行 pnpm build,检查 dist 目录是否生成。
The text was updated successfully, but these errors were encountered: