-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4e16b97
commit 28177fb
Showing
1 changed file
with
21 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,27 @@ | ||
name: Push Container to Heroku | ||
|
||
name: Deploy # The name of the workflow | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
- main #Launch the action on every push on the branch main | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-latest # Setup an environment to run the action | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Check Heroku Version | ||
env: | ||
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} | ||
run: heroku --version | ||
- name: Login to Heroku Container registry | ||
env: | ||
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} | ||
run: heroku container:login | ||
- name: Add remote origin | ||
run: | | ||
git remote add heroku https://heroku:${{ secrets.HEROKU_API_KEY }}@git.heroku.com/djangosnippets.git | ||
- name: Check branches | ||
env: | ||
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} | ||
run: git fetch --all --unshallow | ||
- name: Pull | ||
run: | | ||
git branch | ||
- name: Deploy to Heroku | ||
run: | | ||
git push heroku main | ||
env: | ||
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} | ||
- uses: actions/checkout@v2 # This actions copy the repository on the environment | ||
- uses: akhileshns/[email protected] # This action deploys the content on Heroku | ||
with: | ||
heroku_api_key: ${{secrets.HEROKU_API_KEY}} #The Heroku api key we stored on our repo secret | ||
heroku_app_name: "YOUR_HEROKU_APP" #The name of your heroku app - Must be unique in Heroku | ||
heroku_email: "[email protected]" #Your heroku yuser name | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|