based on : https://github.com/TWweihuang/travis-heroku-demo
Github GitHub, Inc. is a provider of Internet hosting for software development and version control using Git. It offers the distributed version control and source code management (SCM) functionality of Git, plus its own features. It provides access control and several collaboration features such as bug tracking, feature requests, task management, continuous integration and wikis for every project. Headquartered in California, it has been a subsidiary of Microsoft since 2018.
GitHub Actions GitHub Actions makes it easy to automate all your software workflows, now with world-class CI/CD. Build, test, and deploy your code right from GitHub. Make code reviews, branch management, and issue triaging work the way you want.
Heroku Heroku is a cloud platform as a service (PaaS) supporting several programming languages. One of the first cloud platforms, Heroku has been in development since June 2007, when it supported only the Ruby programming language, but now supports Java, Node.js, Scala, Clojure, Python, PHP, and Go.[1] For this reason, Heroku is said to be a polyglot platform as it has features for a developer to build, run and scale applications in a similar manner across most languages.
- Make sure you already have an account of Github, please jump to the page to sign up if you haven't account yet.
- Make sure you have already configure the SSH keys, so that you could pull/push code from the local to the remote repository. if not, please refer to the Generating a new SSH key and adding it to the ssh-agent page.
- Make sure you already installed the IntelliJ IDEA in your desktop, please jump to the page to download and install to the local if not.
https://www.jetbrains.com/help/idea/your-first-spring-application.html
https://docs.github.com/en/get-started/quickstart/create-a-repo
Push the Spring Boot project on local to the Github.
NOTE: make sure the repository is private
- install heroku
- login heroku
heroku login
> note: will open the browser to auth
- generate the Token of the heroku
heroku authorizations:create
will generate:
Creating OAuth Authorization... done
Client: <none>
ID: 7f750130-8992-47ec-99f5-0c9c66cf68e0
Description: Long-lived user authorization
Scope: global
Token: xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Updated at: Fri Aug 05 2022 10:34:53 GMT+0800 (China Standard Time) (less than a minute ago)
copy Token
value to GitHub Actions secrets (replace phodal/github-action-heroku
to your own repository name)
like: HEROKU_API_KEY
(should be same with GitHub Actions config)
- Create Postgres database ( Don't use mysql )
- Copy GitHub Actions CI/CD config from [.github/workflows]
contact: please feel free contact me if you meet any questions or have any concerns.