# Travis CI Not Triggering Build for .yml format issues

**URL:** <https://travis-ci.community/t/travis-ci-not-triggering-build-for-yml-format-issues/3726>\
**Category:** Travis CI Discussions & Feedback\
**Tags:** notifications\
**Created:** [June 14, 2019, 5:11pm UTC](https://travis-ci.community/t/travis-ci-not-triggering-build-for-yml-format-issues/3726 "2019-06-14T17:11:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomiwa1a](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/tomiwa1a/32/1971_2.png) [@tomiwa1a](https://travis-ci.community/u/tomiwa1a)\
**Post date:** [June 14, 2019, 5:11pm UTC](https://travis-ci.community/t/travis-ci-not-triggering-build-for-yml-format-issues/3726/1 "2019-06-14T17:11:13Z")

</div>

My `.travis.yml` file was not triggering a build when pushed. My coworker suggested I change the indentation spacing on my deploy key. It was indented with one space instead of zero spaces and that fixed the issue.

I would have expected the behavior to “fail loudly” and let me know the travis build did not trigger because of a formatting error in my .yml file instead of silently failing.

File that errored:

```auto
language: node_js

node_js:
  - node

cache: npm

script:
  - npm test

 deploy: <-- The following lines had an extra space space at the beginning of the line
   - provider: script
     skip_cleanup: true
     script: npm install -g serverless && sls deploy --stage staging
     on:
       all_branches: true
   - provider: script
     skip_cleanup: true
     script: npm install -g serverless && sls deploy --stage prod
     on:
       branch: master

```

Fixed file that works

```auto
language: node_js

node_js:
  - node

cache: npm

script:
  - npm test

deploy:
 - provider: script
   skip_cleanup: true
   script: npm install -g serverless && sls deploy --stage staging
   on:
     all_branches: true
 - provider: script
   skip_cleanup: true
   script: npm install -g serverless && sls deploy --stage prod
   on:
     branch: master

```

Originally posted at [https://github.com/travis-ci/travis-ci/issues/10435](https://github.com/travis-ci/travis-ci/issues/10435)

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [June 14, 2019, 9:05pm UTC](https://travis-ci.community/t/travis-ci-not-triggering-build-for-yml-format-issues/3726/3 "2019-06-14T21:05:17Z")

</div>

I agree. The YAML syntax error should be reported via GitHub status on the relevant commit. This is currently not happening because notifications fire only _after_ the build has been configured. The syntax error does not allow the build to be configured at all, hence no notification.
