Skip to content

Commit

Permalink
changed deploy-app.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MocStepan committed May 9, 2024
1 parent e69a851 commit 21ae3c8
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/deploy-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,28 @@ jobs:
deploy-backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy backend to Heroku
- name: Checkout Repository
uses: actions/checkout@v4

- name: Build Backend
working-directory: backend
run: |
./gradlew build
cp build/libs/backend-1.0.0.jar ../backend.jar
- name: Build Frontend
working-directory: frontend
run: |
npm install
npm run build
- name: Deploy to Heroku
uses: akhileshns/[email protected]
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: ${{ secrets.HEROKU_BACKEND_NAME }}
heroku_app_name: ${{ secrets.HEROKU_APP_NAME }}
heroku_email: ${{ secrets.HEROKU_EMAIL }}
procfile: 'web: java $JAVA_OPTS -Dserver.port=$PORT -jar build/libs/backend-1.0.0.jar --spring.profiles.active=prod'

appdir: '.' # Deploy the root directory, which contains both backend and frontend
procfile: |
web: java $JAVA_OPTS -Dserver.port=$PORT -jar backend.jar --spring.profiles.active=prod
build: cd frontend && npm start

0 comments on commit 21ae3c8

Please sign in to comment.