I used Heroku to add autodeploy to the project.
First of all, I used repository mirroring from GitLab to GitHub:
- Create a GitHub personal access token.
- I the project, go to
Settings > Repository
, and then expand theMirroring repositories
section. - Enter a repository URL in format:
https://<your_github_username>@github.com/<your_github_repo_link>.git
- In the
Mirror direction
dropdown, selectPush
. - Select an
Password
method from the Authentication method dropdown. - Fill in
Password
field with your GitHub personal access token. - Select
Mirror repository
to save the configuration. - Check if the mirrored repository receives all changes via pushing to GitLab.
Then I connected Heroku to GitHub.
Use this tutorial.
Finally, it's time for deploying a Python Application Using Heroku.
Use this tutorial.
Check.
To check if server is running open this link: https://hello-app-lab1.herokuapp.com