GitHub Actions + Render

Hey,

I’m currently using GitHub Actions to run CI tests, and using the Render.yml to deploy the frontend, backend and database.

I was wondering if people had any suggestions for connecting the two. So for example, if the GH Actions tests fail, the deployment doesn’t continue on Render.

Hi @elie222 ,

When you’ve enabled Auto Deploy, Render will start the deploy every time your target branch changed. Here’s how I would solve things:

Let’s say you have two branches, needs-testing and tests-passed. I’d configure Render to look at my tests-passed branch, and GitHub Actions to look at my needs-testing branch. Whenever my CI tests pass, I’d merge the needs-testing branch into the tests-passed branch to trigger a Render deploy.

1 Like

There is already a feature requests that should help with your issue.

This one is doing exactly what you want, if I understand you correctly. But it’s in the planned state, so it can take months or even longer to have it available.
https://feedback.render.com/features/p/only-deploy-after-ci-tests-pass

Also, you can call a Render.com deployment web-hook from your GitHub Action, but this will work only for static environment and not for PR or preview environments, because you don’t know the URL of the web-hook in advance.

3 Likes