It looks like there is a typo in the workflow definition. There should be a space between the “-” and build. See the below example.
workflows:
version: 2
build-and-deploy:
jobs:
- build
- deploy:
requires:
- build
filters:
branches:
only: master
Additionally, you can use the CircleCI CLI to validate configurations with the below command.
circleci config validate path/to/config
More information is available on this doc: https://circleci.com/docs/2.0/local-cli/#validate-a-circleci-config