Skip to content

JorgeLNJunior/render-deploy

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

CI Coverage Status License

Usage

  • First, you need to disable the auto-deploy option in your render app settings. Go to Settings > Build and Deploy > Auto-Deploy and disable it.
  • In your repository, go to Settings > Secrets and Variables > Actions.
  • Create a variable named RENDER_SERVICE_ID and insert your service ID into it. You can get it on your render service page by copying it from the URL.
  • Create a variable named RENDER_API_KEY and insert your API key into it. You can get a key in your Render Account Settings > API Keys.
  • Choose a template and add it to your pipeline.

Minimal

deploy:
  runs-on: ubuntu-latest
  steps:
      - uses: actions/checkout@v3
      - uses: JorgeLNJunior/render-deploy@v1.4.4
        with:
          service_id: ${{ secrets.RENDER_SERVICE_ID }}
          api_key: ${{ secrets.RENDER_API_KEY }}

Wait for deploy status

deploy:
  runs-on: ubuntu-latest
  steps:
      - uses: actions/checkout@v3
      - uses: JorgeLNJunior/render-deploy@v1.4.4
        with:
          service_id: ${{ secrets.RENDER_SERVICE_ID }}
          api_key: ${{ secrets.RENDER_API_KEY }}
          wait_deploy: true 

Create a github deployment

deploy:
  runs-on: ubuntu-latest
  permissions:
    deployments: write
  steps:
      - uses: actions/checkout@v3
      - uses: JorgeLNJunior/render-deploy@v1.4.4
        with:
          service_id: ${{ secrets.RENDER_SERVICE_ID }}
          api_key: ${{ secrets.RENDER_API_KEY }}
          github_deployment: true 
          deployment_environment: 'production'
          github_token: ${{ secrets.GITHUB_TOKEN }}

Full

deploy:
  runs-on: ubuntu-latest
  permissions:
    deployments: write
  steps:
      - uses: actions/checkout@v3
      - uses: JorgeLNJunior/render-deploy@v1.4.4
        with:
          service_id: ${{ secrets.RENDER_SERVICE_ID }}
          api_key: ${{ secrets.RENDER_API_KEY }}
          clear_cache: true
          wait_deploy: true
          github_deployment: true
          deployment_environment: 'production'
          github_token: ${{ secrets.GITHUB_TOKEN }}

Licence

Project under MIT » license.