Skip to content

Commit

Permalink
Corrected the code to run on push to main (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandhya1874 authored Dec 5, 2024
1 parent 3bcd981 commit 99af568
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Pipeline

on:
pull_request:
types:
- closed
push:
branches:
- main

workflow_dispatch:
inputs:
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:

deploy_to_dev_on_push_to_main:
name: Deploy to dev on push to main
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: ./.github/workflows/deploy.yml
needs:
- build
Expand All @@ -62,7 +62,7 @@ jobs:

deploy_to_prod_on_push_to_main:
name: Deploy to prod on push to main
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: ./.github/workflows/deploy.yml
needs:
- build
Expand Down

0 comments on commit 99af568

Please sign in to comment.