【发布时间】:2021-10-03 13:20:25
【问题描述】:
我尝试创建一个在 ./example 文件夹上运行的 github 操作。 /.example 文件夹中的代码是使用 create-react-app 构建的。
工作流程代码:
name: CI
on:
push:
branches: [ origin ]
pull_request:
branches: [ origin ]
jobs:
build_test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 15.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test example
working-directory: example
run: |
npm install
npm run build --if-present
我的项目结构(./example里面有package.json):
【问题讨论】:
-
您能分享您的项目(如果它是公开的)以在 fork 上测试工作流程吗?
标签: npm continuous-integration create-react-app github-actions