我想我已经按照所有步骤在GitHub Pages上使用我从 https://www.davideguida.com/how-to-deploy-blazor-webassembly-on-github-pages-using-github-actions/中找到的GitHub Actions在GitHub页面上部署Blazor网络程序集
但它Deploy to Github Pages
一步都失败了
- 设置作业(已通过(
- 运行操作/checkout@v2(已通过(
- 设置 .NET 核心(已通过(
- 使用 dotnet 发布(已通过(
- 部署到 Github 页面(失败(
- 运行后操作/checkout@v2(已通过(
- 完成作业(通过(
以下是错误描述
❓ FAQ/Wiki: https://github.com/JamesIves/github-pages-deploy-action/wiki
🔧 Support: https://github.com/JamesIves/github-pages-deploy-action/issues
⭐ Contribute: https://github.com/JamesIves/github-pages-deploy-action/blob/dev/CONTRIBUTING.md
Maintained by James Ives (https://jamesiv.es)
Checking configuration and starting deployment… 🚦
Deploying using …… 🔑
Configuring git…
/usr/bin/git init
Reinitialized existing Git repository in /home/runner/work/FirstBlazor/FirstBlazor/.git/
/usr/bin/git config user.name ngaisteve1
/usr/bin/git config user.email xxx@gmail.com
/usr/bin/git remote rm origin
/usr/bin/git remote add origin ***github.com/ngaisteve1/FirstBlazor.git
/usr/bin/git fetch --no-recurse-submodules
From https://github.com/ngaisteve1/FirstBlazor
* [new branch] master -> origin/master
Git configured… 🔧
Starting to commit changes…
/usr/bin/git ls-remote --heads ***github.com/ngaisteve1/FirstBlazor.git master | wc -l
136e7850750d3861e72a15355289952f94777c9b refs/heads/master
/usr/bin/git checkout --progress --force development
error: pathspec 'development' did not match any file(s) known to git
Running post deployment cleanup jobs… 🗑️
/usr/bin/git worktree remove github-pages-deploy-action-temp-deployment-folder --force
fatal: 'github-pages-deploy-action-temp-deployment-folder' is not a working tree
##[error]The process '/usr/bin/git' failed with exit code 128
Deployment failed! ❌
这是我的 github 存储库 - https://github.com/ngaisteve1/FirstBlazor
您需要从该分支创建一个名为development
master
并在存储库设置中development
分支设置为default
分支。
这是因为您的gh-pages.yml
文件具有BASE_BRANCH: development
和BRANCH: master
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BASE_BRANCH: development # The branch the action should deploy from.
BRANCH: master # The branch the action should deploy to.
FOLDER: build/wwwroot # The folder the action should deploy.
SINGLE_COMMIT: true
以便从development
分支到master
分支进行部署