HC-142-adding-github-workflows #3
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: My Deploy | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
branches: | |
- main | |
- develop | |
workflow_dispatch: # Enables manual triggering | |
jobs: | |
deploy-to-production: | |
if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to production | |
uses: johnbeynon/[email protected] | |
with: | |
service-id: ${{ secrets.PRODUCTION_RENDER_SERVICE_ID }} | |
api-key: ${{ secrets.PRODUCTION_RENDER_API_KEY }} | |
wait-for-success: true | |
deploy-to-develop: | |
if: github.ref == 'refs/heads/develop' || github.event_name == 'workflow_dispatch' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to develop | |
uses: johnbeynon/[email protected] | |
with: | |
service-id: ${{ secrets.STAGING_RENDER_SERVICE_ID }} | |
api-key: ${{ secrets.STAGING_RENDER_API_KEY }} | |
wait-for-success: true |