Github Actions file not running on push

Hi there,
my Actions file is not running on push to the dev branch and at this point, I just need help.
It is located under .github/workflows/artifact.yml in the master branch.

name: Publish Artifact

on:
  push:
    branches: [ dev ]
  pull_request:
    branches: [ dev ]

jobs:
  build-linux:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
        with:
          ref: dev
      - name: Setup Node.js environment
        uses: actions/setup-node@v2.2.0
        with:
          node-version: 14.x
      - name: Setup npm script
        run: npm i
      - name: Build for linux
        run: npm run build-lin
      - name: Remove build files Nr. 1
        run: rm -rf dist/*-unpacked
      - name: Remove build files Nr. 2
        run: rm -rf dist/*.yml
      - name: Upload a Build Artifact
        uses: actions/upload-artifact@v2.2.4
        with:
          name: build_lin
          path: dist/*

thanks in advance,
Christian B.


sorry for my bad english, I am still learning

For push events, the workflow file must be on the branch being pushed. Try committing your workflow to the dev branch.

1 Like

Thanks a lot! That solves the problem!

1 Like