[英]Github Actions not working giving error Invalid type for `on`
當我在 github 上推動我的項目時,它的管道應該可以工作,但它告訴我 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
YAML 是 GitHub 用於操作的格式,對空格和縮進很敏感。 您可能希望將push:
條目寫在單獨的行上,縮進,如下所示:
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
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.