Reputation: 61
When I am pushing my project on github it pipeline should work but it's telling Invalid type for on
name: NASA Project CI
on:
push: branches:[master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js version 16
- uses: actions/setup-node@v2
with: node-version:'16'
- run: npm install
- run: npm run build --prefix client
Upvotes: 5
Views: 5434
Reputation: 76519
YAML, the format that GitHub uses for Actions, is sensitive to space and indentation. You'll probably want to write the push:
entries on separate lines, indented, like so:
name: NASA Project CI
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js version 16
- uses: actions/setup-node@v2
with: node-version:'16'
- run: npm install
- run: npm run build --prefix client
Upvotes: 6