Created
July 13, 2024 21:22
-
-
Save kavicastelo/d848691e6996af43c4efd564691850f7 to your computer and use it in GitHub Desktop.
deploy spring project (java) to render using workflow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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