【发布时间】: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
【问题讨论】:
-
我建议遵循this article 中使用的工作流实现,它执行相同的操作(在 github 页面上部署一个 React 应用程序)。
-
这篇文章要求订阅,如果你能告诉我工作流的名称那就太好了
-
当然,本文使用的工作流程可以在这里找到:github.com/ClydeDz/create-react-app-ghpages-demo/blob/step-2/…
标签: reactjs linux github github-pages github-actions