Skip to content

fix: add Heroku remote setup in CD workflow #45

fix: add Heroku remote setup in CD workflow

fix: add Heroku remote setup in CD workflow #45

Workflow file for this run

name: CD
on:
push:
branches:
- main
jobs:
test:
uses: ./.github/workflows/ci.yml
deploy:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Heroku CLI
run: |
curl https://cli-assets.heroku.com/install.sh | sh
- name: Add Heroku Remote
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: |
git remote add heroku https://heroku:$HEROKU_API_KEY@git.heroku.com/github-commit-monitor.git
- name: Set Heroku stack to buildpack
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: heroku stack:set heroku-22 -a github-commit-monitor
- name: Push to Heroku using Git
run: git push heroku main
- name: Set environment variables
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: |
heroku config:set MY_GITHUB_SECRET=${{ secrets.MY_GITHUB_SECRET }} -a github-commit-monitor
heroku config:set CHANNEL_ID=${{ secrets.CHANNEL_ID }} -a github-commit-monitor
heroku config:set APP_URL=https://github-commit-monitor-4a53c549b932.herokuapp.com/ -a github-commit-monitor