/wim-ci-cd-example

This repository shows the possibilities with gitub actions.

Primary LanguageJava

Deploy on Push Deploy on PR Jacoco Coverage

WIM CI/CD Example Project

This pipeline consists out of a Spring Boot Java Projekt in folder "wim-calculator-backend".

Deployment with Github Actions

https://docs.github.com/en/actions/deployment/about-deployments/deploying-with-github-actions

Deploy to Heroku

Step 1

Install Heroku CLI

npm install -g heroku

Step 2

Login to Heroku

heroku login

Step 3

Create Heroku app via CLI

heroku create backend-api

Step 4 - Deploy to Heroku?

heroku deploy:jar target/calculator.jar --app wim-backend

Set API Key for Deployment

set HEROKU_API_KEY="<<<API KEY>>>"

Show Logs of Heroku

heroku logs --tail --app wim-backend

Set Remote Repo to heroku:

heroku git:remote -a wim-java-backend

Sources

Create custom action: https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action#commit-tag-and-push-your-action-to-github

Example https://github.com/open-sauced/hot/tree/main/.github/workflows