Deploy Heroku #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Heroku | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| heroku: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Check out Git repository" | |
| uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0 | |
| - name: "Set Heroku app & branch for ${{ github.ref }}" | |
| run: | | |
| echo $GITHUB_REF | |
| if [ "$GITHUB_REF" == "refs/heads/main" ]; then | |
| echo "HEROKU_APP=" >> $GITHUB_ENV | |
| fi | |
| echo "HEROKU_BRANCH=main" >> $GITHUB_ENV | |
| - name: Install Heroku CLI | |
| run: | | |
| curl https://cli-assets.heroku.com/install.sh | sh | |
| - name: "Deploy ${{ github.ref }} to Heroku" | |
| uses: akhileshns/[email protected] | |
| with: | |
| heroku_api_key: ${{ secrets.HEROKU_API_KEY }} | |
| heroku_app_name: "dsomm" | |
| heroku_email: [email protected] | |
| branch: ${{ env.HEROKU_BRANCH }} | |
| usedocker: true |