How should I think about CI on render?

Deployments are a pure joy using Render :slight_smile: . It is easy to set up and get what is happening.

But I struggle a bit when it comes to customizing my builds. I like to run some tests, run a postgres-service for integrations tests, etc.

I ended up running my builds and integrations tests using GitHub actions and turned off my automated deployments in Render. I’ve seen that there’s a deployment hook in Render. So I guess I could call that once builds are successful at GitHub? I guess I could also have a deploy-branch and move code that successfully builds over there? Is that what people do?

Are there any other ways of doing it? And are there any ongoing initiatives to make this a bit more integrated?

Hey Richard,
You’re definitely on the right line. Ensuring that a service does not auto-deploy and then triggering a request to the webhook deploy URL for the service from the GitHub action is the best way to do this right now.

We are working to improve the developer flow so expect more on that at some point this year.

John B

Hi @John_B. Related to this, I found your Github action GitHub - johnbeynon/render-deploy-action: A Github Action for trigging a deploy of a Render service. and am trying to get it working. Is this a good solution to use here?

It’s hard to tell what error I’m running into as the action output doesn’t give much information. Maybe I have misconfigured it (guessing key & service ID from the webhook URL).

SyntaxError: Unexpected token U in JSON at position 0
    at JSON.parse (<anonymous>)
    at Response.json (/home/runner/work/_actions/johnbeynon/render-deploy-action/v0.0.3/dist/index.js:6946:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Happy to keep trying to get this rolling, or take another route if this isn’t a good path.

It was a little broken but I’ve just fixed it - use it like:

  - name: Trigger Render deploy for web
        uses: johnbeynon/render-deploy-action@v0.0.8
        with:
          service-id: ${{ secrets.SOME_SERVICE_ID }}
          api-key: ${{ secrets.RENDER_API_KEY }}

Create an API key from your user page in the Render dashboard and grab the serviceID from the URL when looking at a service - it will look like ‘svc-…’

1 Like

Many thanks John. Will get it rolling and if I bump into any further issues I’ll put them into Github issues.

1 Like

sure thing!

Is there any timeline for improvements or an Issue you could link here?

I regularly forget that my service is deployed every time even though the test-suite might not have succeded. That kinda sucks.