name: Deploy
on:
  push:
    branches:
      - main

jobs:
  deploy:
    runs-on: ubuntu-latest
    environment:
      name: production
      url: https://www.theodinproject.com/
    name: Deploy production
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: Push to Heroku
        run: git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git main
        env:
          HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
          HEROKU_APP_NAME: theodinproject

Use Github Action to Deploy
Chore: Use Github Action to Deploy

Because
* [Heroku's github integration has been disabled until further notice](https://status.heroku.com/incidents/2413).

This commit:
* Trigger Heroku deploy Github action when push to main event happens.
