Merge pull request #54 from MarkE16/fixes-2 #33
This file contains hidden or 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: 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 -t ghcr.io/marke16/livecanvas:prod . --build-arg NODE_ENV=production | |
| 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" | |
| }' |