简体   繁体   English

在 github 操作上部署 nextJS 应用程序时出错

[英]Error deploying a nextJS app on github actions

I'm trying to deploy my nextJS app on GitHub pages.我正在尝试在 GitHub 页上部署我的 nextJS 应用程序。 I'm getting an error at the deploy stage.我在部署阶段遇到错误。

My node.js.yml file contains the following:我的node.js.yml文件包含以下内容:

name: Node.js CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [14.x]

    steps:
      - uses: actions/checkout@v2
      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v2
        with:
          node-version: ${{ matrix.node-version }}
          cache: "npm"
      - run: npm ci
      - run: npm run build
      - run: npm run export
      - run: touch ./out/.nojekyll

      - name: Deploy 🚀
        uses: JamesIves/github-pages-deploy-action@v4.2.5
        with:
          branch: gh-pages # The branch the action should deploy to.
          folder: out # The folder the action should deploy.

The error code there I get while deploying my repository on another branch is the following:在另一个分支上部署我的存储库时出现的错误代码如下:

remote: Permission to 0xWerz/0xwerz.github.io.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/0xWerz/0xwerz.github.io.git/': The requested URL returned error: 403
Running post deployment cleanup jobs… 🗑️
/usr/bin/git checkout -B github-pages-deploy-action/tpuzb7jkb
Reset branch 'github-pages-deploy-action/tpuzb7jkb'
/usr/bin/chmod -R 777 github-pages-deploy-action-temp-deployment-folder
/usr/bin/git worktree remove github-pages-deploy-action-temp-deployment-folder --force
Error: The deploy step encountered an error: The process '/usr/bin/git' failed with exit code 128 ❌
Notice: Deployment failed! ❌

The deploy action needs write access to your repository.部署操作需要对您的存储库的写入权限。

Or upgrade to a newer version of the action, ie 4.3.3或者升级到更新版本的动作,即 4.3.3

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Github 将 docker 部署到 package 的操作 | 错误:未找到:python - Github Actions deploying docker to package | Error: not found: python 通过 Github 操作将 node.js 部署到 azure web 应用程序,由于我引用的一些错误和下面的屏幕截图,我的构建一直失败。 请与泰 - Deploying node.js to azure web app Via Github Actions, I keep failing my build due to some error that i quoted and screenshot below. Please & Ty 使用 Github Actions 将 Angular 应用程序部署到 Azure 失败。 找不到 package.json - Deploying angular app to Azure with Github Actions failed. package.json not found 通过 Github Actions 部署后 POST 到 /generate OpenAPI 上的 405 - NextJS - 405 on POST to /generate OpenAPI after deployment through Github Actions - NextJS 将 github 回购协议部署到铁路。 应用程序结果 - 应用程序错误您的应用程序是否正确侦听 $PORT? - Deploying github repo to railway. app resulting - Application Error Is your app correctly listening on $PORT? 将 github 回购协议部署到铁路。 应用程序结果 - 应用程序错误您的应用程序是否正确监听端口? - Deploying github repo to railway. app resulting - Application Error Is your app correctly listening on PORT? 在Express中包装的Azure NextJs应用程序上部署后,应用程序将永远加载 - After Deploying on Azure NextJs App wrapped in Express, app loads forever 将Angular2应用程序部署到Github错误:events.js throw er; //未处理的“错误”事件 - Deploying Angular2 App to Github Error : events.js throw er; // Unhandled 'error' event 通过github将AngularJS应用程序部署到Azure无法正常工作 - Deploying AngularJS app to Azure via github not working Github 操作不起作用给出错误“on”的类型无效 - Github Actions not working giving error Invalid type for `on`
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM