Skip to content

Commit

Permalink
fix: install the Heroku CLI directly in the workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tungkhanhh committed Sep 21, 2024
1 parent 037dc09 commit 9a045db
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,20 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Configure Git
- name: Install Heroku CLI
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
curl https://cli-assets.heroku.com/install.sh | sh
- name: Deploy Frontend to Heroku
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: |
cd frontend
heroku login -i # Login to Heroku using the API key
heroku git:remote -a jetedge-test
git add . # You might need to add files to deploy
heroku git:remote -a $HEROKU_APP_NAME
git add . # Add all changes
git commit -m "Deploying Frontend" || echo "No changes to commit"
git push heroku main --force # Ensure you're pushing to the correct branch
git push heroku main --force # Push to Heroku
# - name: Deploy Backend to Heroku
# env:
# HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
Expand Down

0 comments on commit 9a045db

Please sign in to comment.