-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (28 loc) · 962 Bytes
/
deploy-prod.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
name: Build and Deploy to Render
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- 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.prod -t ghcr.io/marke16/livecanvas:prod .
docker push ghcr.io/marke16/livecanvas:prod
- name: Deploy to Render
run: |
curl -X POST \
--url https://api.render.com/v1/services/${{ secrets.RENDER_PROD_SERVICE_ID }}/deploys \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'authorization: Bearer ${{ secrets.RENDER_KEY }}' \
--data '{
"imageUrl": "ghcr.io/marke16/livecanvas:prod"
}'