Skip to content

amdelamar/scala-github-actions-heroku

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI/CD with Github Actions & Heroku

This simple Scala app shows how you can setup CI/CD with GitHub Actions and Heroku.

Requires JDK 8 and sbt.

CI

Opening a Pull Request against master branch will run:

$ sbt compile
$ sbt test

You can modify what commands are executed on every PR in the .github/workflows/master-pull-request.yml file.

If the commands exit with code != 0, (e.g. if a unit test fails), then the PR wil be marked as not passing that check.

You could add more commands like linting, code coverage checks, or whatever your heart desires. (Even deploy on PR too for end-to-end testing!)

CD

After merging your Pull Request to master this command will run:

$ sbt stage deployHeroku

And your app will be pushed and deployed on Heroku in less than a minute!

Note: You'll have to set a secret value for the HEROKU_API_KEY required to deploy your app to Heroku. This can be done in GitHub -> Settings -> Secrets -> Add new secret.

You can modify what commands are executed on every merge in the .github/workflows/master-push.yml file.

You could add more commands like packaging, publishing, Docker image creation, or whatever your heart desires. (Even modify/close GitHub issues!)

About

CI/CD setup for a Scala app with GitHub Actions and Heroku

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages