workflow_run only on push

Viewed 89

I have the following workflow:

name: ci

on:
  push:
    branches: [main, develop]
  pull_request:

jobs:
   ....
name: deploy

on:
  release:
    types: [released]
  workflow_run:
    workflows: ["ci"]
    branches: [develop]
    types: [completed]

The problem I have is that when I create a PR from the develop to the main branch it also runs the deploy workflow. Is there any way to prevent this? and just run the deploy workflow on push after the CI finishes?

Thanks

0 Answers
Related