我试图在我的分支中添加circle ci,因为我有许多分支,我添加了circleci和配置文件lite这:
version: 2.1
orbs:
node: circleci/node@5.0.2
heroku: circleci/heroku@1.2.6
jobs:
build_and_test:
executor: node/default
steps:
- checkout
- node/install-packages:
pkg-manager: npm
- run:
command: npm run test
name: Run tests
- run:
command: npm run build
name: Build app
- persist_to_workspace:
root: ~/project
paths:
- .
deploy: # this can be any name you choose
executor: heroku/default
steps:
- attach_workspace:
at: ~/project
- heroku/deploy-via-git:
force: true # force push when pushing to the heroku remote, see: https://devcenter.heroku.com/articles/git
workflows:
test_my_app:
jobs:
- build_and_test
- deploy:
requires:
- build_and_test # only deploy if the build_and_test job has completed
filters:
branches:
only: main
# only: main # only deploy when on main
这是来自圆ci的误差:
ERROR IN CONFIG FILE:
[#/workflows/test_my_app] only 1 subschema matches out of 2
1. [#/workflows/test_my_app/jobs/1] 0 subschemas matched instead of one
| 1. [#/workflows/test_my_app/jobs/1] expected type: String, found: Mapping
| | SCHEMA:`
这是来自圆ci的误差:
ERROR IN CONFIG FILE:
[#/workflows/test_my_app] only 1 subschema matches out of 2
1. [#/workflows/test_my_app/jobs/1] 0 subschemas matched instead of one
| 1. [#/workflows/test_my_app/jobs/1] expected type: String, found: Mapping
| | SCHEMA:**strong text**`
1条答案
按热度按时间f0brbegy1#
您需要缩进
only: main
行(branches
的正下方)。请参阅此处的正确格式示例。