Skip to content

Commit

Permalink
Ex 11.14: Run deployment step only for the main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
HoangCaesar committed Nov 27, 2023
1 parent 4872482 commit 0ae5112
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/drender_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,21 @@ on:
types: [opened, synchronize]

jobs:
simple_deployment_pipeline:
name: Deploy to Render
build:
runs-on: ubuntu-latest
steps:
- name: Trigger deployment
run: curl https://api.render.com/deploy/srv-${{ secrets.RENDER_SERVICE_ID }}?key=${{ secrets.RENDER_API_KEY }}
- uses: actions/checkout@v2
- name: Run build
run: echo "Building the project..."

deploy:
runs-on: ubuntu-latest
needs: build
if: ${{ github.event_name == 'push' }}
steps:
- uses: actions/checkout@v2
- name: Deploy to Render
run: echo "Deploying the project..."
- name: Trigger deployment
run: curl https://api.render.com/deploy/srv-${{ secrets.RENDER_SERVICE_ID }}?key=${{ secrets.RENDER_API_KEY }}

0 comments on commit 0ae5112

Please sign in to comment.