Reputation: 329
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 the error I am getting on github
Upvotes: 4
Views: 2038
Reputation: 22890
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
Upvotes: 3