Skip to content

Instantly share code, notes, and snippets.

@kavicastelo
Created July 13, 2024 21:22
Show Gist options
  • Save kavicastelo/d848691e6996af43c4efd564691850f7 to your computer and use it in GitHub Desktop.
Save kavicastelo/d848691e6996af43c4efd564691850f7 to your computer and use it in GitHub Desktop.
deploy spring project (java) to render using workflow
name: Deploy to Render
on:
push:
branches:
- 'main'
jobs:
deploy:
if: contains(github.event.head_commit.message, '[run-all]')
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '17'
- name: Build backend
run: |
chmod +x ./mvnw
./mvnw clean package -DskipTests
- name: Deploy to Render
run: |
curl -X POST -H "Accept: application/json" -H "Authorization: Bearer ${{ secrets.RENDER_API_KEY }}" \
-d '{}' \
https://api.render.com/v1/services/YOUR_SERVICE_ID/deploys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment