DEV Community

Discussion on: Deploying to Heroku from GitHub Actions

Collapse
 
gusbemacbe profile image
Gustavo Costa

@manojap and @iamjithindas

Switch to a new source code:

name: Deploy

on:
  push:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v2
      - name: Updating Ubuntu system and Heroku
        env: 
          HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
        run: sudo apt update && sudo apt install heroku neofetch
      - name: Checking the info
        run: neofetch

      - uses: akhileshns/heroku-deploy@v3.8.8
        with:
          heroku_email: your Heroku e-mail
          heroku_api_key: ${{secrets.HEROKU_API_KEY}}
          heroku_app_name: your Heroku app names (go to your project's settings and check the app name)
          branch: HEAD
          useforce: false
          dynamicFiles: false
Enter fullscreen mode Exit fullscreen mode