Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Deploy
on:
workflow_run:
workflows: ["CI with Maven"]
branches: [main]
types:
- completed

jobs:
on-success:
runs-on: ubuntu-latest
permissions:
deployments: write
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: JorgeLNJunior/render-deploy@v1.4.5
with:
service_id: ${{ secrets.RENDER_SERVICE_ID }}
api_key: ${{ secrets.RENDER_API_KEY }}
wait_deploy: true
github_deployment: true
deployment_environment: 'production'
github_token: ${{ secrets.GITHUB_TOKEN }}
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Use an official Maven image as the base image
FROM maven:3.8.4-openjdk-17-slim AS build
# Set the working directory in the container
WORKDIR /app

COPY pom.xml .
COPY src ./src

# Build the application using Maven
RUN mvn clean package

# Use an official OpenJDK image as the base image
FROM openjdk:21-slim
# Set the working directory in the container
WORKDIR /app

# Copy the built JAR file from the previous stage to the container
COPY --from=build /app/target/springboot-0.0.1-SNAPSHOT.jar app.jar

# Set the entry point to run your application
ENTRYPOINT ["java","-jar","/app/app.jar"]
Loading