diff --git a/.github/workflows/netlify-main.yaml b/.github/workflows/netlify-main.yaml index ad1f3cd..5ba15a6 100644 --- a/.github/workflows/netlify-main.yaml +++ b/.github/workflows/netlify-main.yaml @@ -12,7 +12,11 @@ jobs: runs-on: ubuntu-latest permissions: deployments: write - if: github.event.workflow_run.conclusion == 'success' + # Important: the 'branches' filter above will match the 'main' branch on forks, + # so we need to check the head repo too in order to not run on PRs from forks + # We check the branch name again too just for completeness + # (Is there a nicer way to see if a PR is from a fork?) + if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_repository.full_name == 'vector-im/element-call' && github.event.workflow_run.head_branch == 'main' steps: - name: Create Deployment uses: bobheadxi/deployments@v1