mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-04 19:24:51 +00:00
Create deploy.yml
This commit is contained in:
parent
a6ef59ec4e
commit
0c5dd2369c
1 changed files with 33 additions and 0 deletions
33
.github/workflows/deploy.yml
vendored
Normal file
33
.github/workflows/deploy.yml
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
name: Deploying to heroku
|
||||||
|
|
||||||
|
on: workflow_dispatch
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE_NAME: web
|
||||||
|
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
|
||||||
|
CONFIG_FILE_URL: ${{ secrets.CONFIG_FILE_URL }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_and_push:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Build the image
|
||||||
|
run: docker build . --file Dockerfile -t "${IMAGE_NAME}"
|
||||||
|
|
||||||
|
- name: Login into heroku container registry
|
||||||
|
run: heroku container:login
|
||||||
|
|
||||||
|
- name: Create heroku app name
|
||||||
|
run: heroku create --region eu ${{ secrets.HEROKU_APP_NAME }}
|
||||||
|
|
||||||
|
- name: Push the image container to heroku
|
||||||
|
run: heroku container:push "${IMAGE_NAME}" -a ${{ secrets.HEROKU_APP_NAME }}
|
||||||
|
|
||||||
|
- name: Release image to heroku
|
||||||
|
run: heroku container:release "${IMAGE_NAME}" -a ${{ secrets.HEROKU_APP_NAME }}
|
||||||
|
|
||||||
|
- name: Setting up config env
|
||||||
|
run: heroku config:set CONFIG_FILE_URL="${CONFIG_FILE_URL}" HEROKU_API_KEY="${HEROKU_API_KEY}" HEROKU_APP_NAME="${{ secrets.HEROKU_APP_NAME }}" -a ${{ secrets.HEROKU_APP_NAME }}
|
||||||
Loading…
Reference in a new issue