简体   繁体   English

Github 操作不起作用给出错误“on”的类型无效

[英]Github Actions not working giving error Invalid type for `on`

When I am pushing my project on github it pipeline should work but it's telling 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, the format that GitHub uses for Actions, is sensitive to space and indentation. YAML 是 GitHub 用于操作的格式,对空格和缩进很敏感。 You'll probably want to write the push: entries on separate lines, indented, like so:您可能希望将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.

相关问题 mongoose 在 findById 上给出错误无效类型 - mongoose is giving error invalid type on findById 部署到 Netlify Github 操作不起作用 - Deploy to Netlify Github Actions not working loadStripe 一直给我 {type: "invalid_request_error", message: "Invalid API Key provided: undefined"} 错误 - loadStripe keeps giving me {type: "invalid_request_error", message: "Invalid API Key provided: undefined"} error 错误 TS2307:找不到模块或其对应的类型声明。 在 Github 操作 - error TS2307: Cannot find module or its corresponding type declarations. on Github Actions 在 github 操作上部署 nextJS 应用程序时出错 - Error deploying a nextJS app on github actions Nuxt 致命错误在 GitHub 操作中启动 nuxt - Nuxt Fatal Error starting nuxt in GitHub Actions GitHub 对子文件夹中的 Node.js 应用程序使用“工作目录”选项时出现操作部署错误,以及压缩/解压缩工件步骤 - GitHub Actions deploy error when using 'working-directory' option for Node.js app in subfolder, and zip/unzip artifact steps Nodemailer 一直给我一个错误:“TypeError [ERR_INVALID_ARG_TYPE]:“chunk”参数必须是字符串类型或......” - Nodemailer keeps giving me an error: "TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or..." Node.js 应用程序的 Github 动作缓存不起作用 - Github actions caching for Node.js application is not working peerConnection.addIceCandidate给出错误:无效的字符串 - peerConnection.addIceCandidate giving error: invalid string
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM