首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在github操作上部署nextJS应用程序时出错

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

Stack Overflow用户
提问于 2022-04-28 05:41:43
回答 1查看 678关注 0票数 0

我正在尝试将我的nextJS应用程序部署到GitHub页面上。我在部署阶段出现了一个错误。

我的node.js.yml文件包含以下内容:

代码语言:javascript
复制
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.

在将存储库部署到另一个分支时获得的错误代码如下所示:

代码语言:javascript
复制
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! ❌
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-04-29 11:22:49

部署操作需要对存储库进行写访问。

或升级到更新版本的操作,即4.3.3

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72038527

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档