File tree Expand file tree Collapse file tree 1 file changed +21
-29
lines changed Expand file tree Collapse file tree 1 file changed +21
-29
lines changed Original file line number Diff line number Diff line change 1
- name : Push Container to Heroku
2
-
1
+ name : Deploy # The name of the workflow
3
2
on :
4
3
push :
5
4
branches :
6
- - main
7
-
5
+ - main # Launch the action on every push on the branch main
8
6
jobs :
9
7
build :
10
- runs-on : ubuntu-latest
8
+ runs-on : ubuntu-latest # Setup an environment to run the action
11
9
steps :
12
- - uses : actions/checkout@v2
13
- - name : Check Heroku Version
14
- env :
15
- HEROKU_API_KEY : ${{ secrets.HEROKU_API_KEY }}
16
- run : heroku --version
17
- - name : Login to Heroku Container registry
18
- env :
19
- HEROKU_API_KEY : ${{ secrets.HEROKU_API_KEY }}
20
- run : heroku container:login
21
- - name : Add remote origin
22
- run : |
23
- git remote add heroku https://heroku:${{ secrets.HEROKU_API_KEY }}@git.heroku.com/djangosnippets.git
24
- - name : Check branches
25
- env :
26
- HEROKU_API_KEY : ${{ secrets.HEROKU_API_KEY }}
27
- run : git fetch --all --unshallow
28
- - name : Pull
29
- run : |
30
- git branch
31
- - name : Deploy to Heroku
32
- run : |
33
- git push heroku main
34
- env :
35
- HEROKU_API_KEY : ${{ secrets.HEROKU_API_KEY }}
10
+ - uses : actions/checkout@v2 # This actions copy the repository on the environment
11
+ -
uses :
akhileshns/[email protected] # This action deploys the content on Heroku
12
+ with :
13
+ heroku_api_key : ${{secrets.HEROKU_API_KEY}} # The Heroku api key we stored on our repo secret
14
+ heroku_app_name : " YOUR_HEROKU_APP" # The name of your heroku app - Must be unique in Heroku
15
+ heroku_email :
" [email protected] " # Your heroku yuser name
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
You can’t perform that action at this time.
0 commit comments