Skip to content

Commit

Permalink
Deploy only if there are no syntax errors
Browse files Browse the repository at this point in the history
  • Loading branch information
memgonzales authored Aug 23, 2023
1 parent c53ddd4 commit 21a4c7b
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/deploy-to-render.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
name: Deploy to Render

on:
push:
branches: [ main ]
workflow_run:
workflows: [Check for syntax errors]
types: [completed]
branches: [main]

jobs:
build:
deploy-to-render:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}

steps:
- name: Deploy to production
uses: johnbeynon/render-deploy-action@v0.0.8
with:
service-id: ${{ secrets.MY_RENDER_SERVICE_ID }}
api-key: ${{ secrets.MY_RENDER_API_KEY }}

on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo 'The triggering workflow failed'

0 comments on commit 21a4c7b

Please sign in to comment.