Skip to content

Merge pull request #180 from Frnn4268/Frnn #32

Merge pull request #180 from Frnn4268/Frnn

Merge pull request #180 from Frnn4268/Frnn #32

name: Deploy to Netlify and Render
on:
push:
branches:
- master
jobs:
deploy-netlify:
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, 'frontend')
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v1.1.3
with:
publish-dir: ./frontend/dist
production-deploy: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
deploy-render:
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, 'backend')
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Deploy to Render
run: |
curl -X POST -H "Accept: application/json" -H "Authorization: Bearer ${{ secrets.RENDER_API_KEY }}" \
-d '{"serviceId": "${{ secrets.RENDER_SERVICE_ID }}", "branch": "master"}' \
https://api.render.com/v1/services/${{ secrets.RENDER_SERVICE_ID }}/deploys