-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 1.02 KB
/
deploy-netlify-render.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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