Skip to content

feat: add custom render build script with timestamp-based change dete… #6

feat: add custom render build script with timestamp-based change dete…

feat: add custom render build script with timestamp-based change dete… #6

Workflow file for this run

name: Trigger Deploy to Render
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy to Render
id: deploy
env:
RENDER_API_KEY: ${{ secrets.RENDER_API_KEY }}
SERVICE_ID: ${{ secrets.RENDER_SERVICE_ID }}
run: |
response=$(curl --write-out "%{http_code}" --silent --output response.json --request POST \
--url "https://api.render.com/v1/services/${{ secrets.RENDER_SERVICE_ID }}/deploys" \
--header "accept: application/json" \
--header "authorization: Bearer ${{ secrets.RENDER_API_KEY }}" \
--header "content-type: application/json")
echo "HTTP_RESPONSE=$response" >> $GITHUB_ENV
if [[ "$response" -eq 200 ]]; then
echo "Deployment triggered successfully"
else
echo "Deployment failed"
cat response.json
exit 1
fi
- name: Success Step
if: success()
run: echo "Deployment was successful"
- name: Failure Step
if: failure()
run: echo "Deployment failed"