This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Best Practices Assignment - Automatically Deploy to Staging and Production | |
on: | |
workflow_run: | |
workflows: ["Best Practices Assignment - Commit Phase"] | |
types: | |
- completed | |
push: | |
paths: | |
- 'ThePhasesOfCraftship/2_best_practice_first/deployment/assignment/end/**' | |
branches: | |
- main # or specify your desired branch | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Deploy | |
# Only run this step if the branch is main | |
if: github.ref == 'refs/heads/main' | |
env: | |
deploy_url: ${{ secrets.RENDER_DEPLOY_HOOK_URL }} | |
run: | | |
curl "$deploy_url" |