-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (29 loc) · 996 Bytes
/
deploy-dev.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
name: Build and Deploy to Render
on:
push:
branches:
- dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Login to Container Registry
run: |
echo ${{ secrets.GH_TOKEN }} | docker login ghcr.io -u marke16 --password-stdin
- name: Build and push Docker image
run: |
docker build -f Dockerfile.dev -t ghcr.io/marke16/livecanvas:dev .
docker push ghcr.io/marke16/livecanvas:dev
- name: Deploy to Render
run: |
curl -X POST \
--url https://api.render.com/v1/services/${{ secrets.RENDER_SERVICE_ID }}/deploys \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'authorization: Bearer ${{ secrets.RENDER_KEY }}' \
--data '{
"commitId": "${{ github.sha }}",
"imageUrl": "ghcr.io/marke16/livecanvas:dev"
}'