Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

birdietorerik's avatar

Somthing is wrong in my .yml file Github Action

Hi!

I try to run my workflow Github Action

name: test
 
on:
  push:
    branches: 
    - production
 
jobs:
    
    name: Create deployment easyflow-Admin 
    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v2
      name: Compile CSS and vue.js
      run: npm install

Bu this gives me an error:


Invalid workflow file : .github/workflows/deploy-application.yml#L10
You have an error in your yaml syntax on line 10

What is wrong ???

0 likes
2 replies
martinbean's avatar
Level 80

@birdietorerik I don’t know. Which line is actually line 10? Look there.

We can’t see because you’ve just pasted a code block that doesn’t have line numbering unfortunately.

EDIT: Looking again, I think it’s because you’ve not actually named your job. All jobs in GitHub Actions should have a job name I believe. You also need to split out your steps so they’ve actually individual steps:

jobs:
  build_and_test:
    name: Build and test
    runs-on: ubuntu-latest

    steps:
      - name: Check out code
        uses: actions/checkout@v2

      - name: Install NPM dependencies
        run: npm ci

      - name: Build assets
        run: npm run production

      - name: Install Composer dependencies
        run: composer install --no-interaction --no-progress --prefer-dist

      - name: Run PHP tests
        run: vendor/bin/phpunit --stop-on-error --stop-on-failure

Please or to participate in this conversation.