diff --git a/.github/workflows/deploy_production.yml b/.github/workflows/deploy_production.yml index 48179a4a..02b0f2ba 100644 --- a/.github/workflows/deploy_production.yml +++ b/.github/workflows/deploy_production.yml @@ -1,5 +1,5 @@ on: - push: + pull_request: branches: - main - tf-actions @@ -75,9 +75,13 @@ jobs: *Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`, Working Directory: \`${{ env.tf_actions_working_dir }}\`, Workflow: \`${{ github.workflow }}\`*`; - github.rest.issues.createComment({ - issue_number: context.payload.pull_request.number, - owner: context.repo.owner, - repo: context.repo.repo, - body - }) \ No newline at end of file + const pr_number = context.payload.pull_request.number + + if (pr_number) { + github.rest.issues.createComment({ + issue_number: pr_number, + owner: context.repo.owner, + repo: context.repo.repo, + body + }) + } \ No newline at end of file