简体   繁体   English

在 github 操作中运行时 mv 命令不起作用

[英]mv command not working while running in github actions

Simply I want to publish my react app on github pages so I want to move the build folder to docs folder and I am running react build using github actions只是我想在 github 页面上发布我的反应应用程序,所以我想将构建文件夹移动到 docs 文件夹,我正在使用 github 操作运行反应构建

my integrate.yml looks like this我的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

The output also shows that the folder is renamed output 也显示文件夹改名了

this is the output -这是 output -

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

I cannot see any error or some form of wrong prompt我看不到任何错误或某种形式的错误提示

here is my github repository Github Repo这是我的 github 存储库Github存储库

The command was working but the code changes in the local repository of actions does not automatically publish, you need to commit them inorder to the changes该命令正在运行,但本地操作存储库中的代码更改不会自动发布,您需要提交它们才能进行更改

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM