【问题标题】:mv command not working while running in github actions在 github 操作中运行时 mv 命令不起作用
【发布时间】:2021-08-29 16:17:24
【问题描述】:

我只是想在 github 页面上发布我的 react 应用程序,所以我想将 build 文件夹移动到 docs 文件夹 我正在使用 github 操作运行 react build

我的Integrate.yml 看起来像这样

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

  workflow_dispatch:
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        
      - name: Setup Node.js environment
        uses: actions/setup-node@v2.1.5

      - name: Download Modules
        run: npm ci

      - name: React Build 
        run: |
          npm run build
          ls -a
          mv build docs --verbose
          ls -a

输出还显示文件夹已重命名

这是输出 -

Find out more about deployment here:

  https://cra.link/deployment

.
..
.git
.github
.gitignore
README.md
build
node_modules
package-lock.json
package.json
public
src
renamed 'build' -> 'docs'
.
..
.git
.github
.gitignore
README.md
docs
node_modules
package-lock.json
package.json
public
src

我看不到任何错误或某种形式的错误提示

这是我的 github 存储库 Github Repo

【问题讨论】:

标签: reactjs linux github github-pages github-actions


【解决方案1】:

该命令正在运行,但本地操作存储库中的代码更改不会自动发布, 您需要提交它们才能进行更改

【讨论】:

    猜你喜欢
    • 2022-06-14
    • 2021-06-08
    • 2020-11-20
    • 2022-01-12
    • 2022-12-29
    • 2014-04-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-16
    相关资源
    最近更新 更多