I am actually implementing CI/CD for my application. I want to start the application automatically using pm2. So I am getting the syntax error on line 22.
This is my yml file

This is the error I am getting on github

The problem in the syntax here is related to how you used the - symbol.
With Github actions, you need at least a run or uses field inform for each step inside your job, at the same level of the name field (which is not mandarory), otherwise the github interpreter will return an error.
Here, from line 22, you used something like this:
- name: ...
  - run: ...
  - run: ...
  - run: ...
So there are two problems:
name and the run field aren't at the same yaml level.name field doesn't have a run or uses field associated with it (you need at least one of them).The correct syntax should be:
- name: ...
  run: ...
- run: ...
- run: ...
Reference about workflow syntax
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With