Skip to content

Commit

Permalink
fix: set up Java for backend in .yml file
Browse files Browse the repository at this point in the history
  • Loading branch information
tungkhanhh committed Sep 29, 2024
1 parent d212cd3 commit c652c32
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Node.js for Frontend
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '20.17.0'

Expand All @@ -30,20 +30,23 @@ jobs:
npm run build
- name: Set up Java for Backend
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: 'oracle'
java-version: '22.0.2'
distribution: 'temurin'
java-version: '22'
cache: 'maven'
cache-dependency-path: 'backend/pom.xml'

- name: Build Backend
- name: Build Backend with Maven
run: |
cd backend
mvnw package
mvn -B package --file pom.xml
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: akhileshns/[email protected]
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
Expand All @@ -56,4 +59,4 @@ jobs:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: ${{secrets.HEROKU_BACKEND_APP_NAME}}
heroku_email: ${{secrets.HEROKU_EMAIL}}
appdir: "backend"
appdir: "backend"

0 comments on commit c652c32

Please sign in to comment.