By default, when Render.com creates a PR environment, it adds a comment to your PR. We use the Render API to add a deployment and update its state.
Note that this action waits until the deployment is completed, so you will be billed for the minutes where it's essentially waiting for the deployment to be completed or errored.
Add you Render API key to the Actions secret RENDER_API_KEY
and create a worklow .github/workflows/render-deployment-status.yml
:
name: Render deployment status
on:
issue_comment:
types: [created]
jobs:
update:
timeout-minutes: 15
runs-on: ubuntu-latest
if: github.event.comment.user.login == 'render[bot]'
permissions:
deployments: write
steps:
- uses: AnandChowdhary/render-deployment-status-action@main
with:
render-api-key: ${{ secrets.RENDER_API_KEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}
This workflow uses the latest version of this action and runs whenever a comment is made by Render's app. The default GitHub token is used with "write" permission for "deployments".