From 39cb3a38ea94e38c10980236e83eca9bdc50d020 Mon Sep 17 00:00:00 2001 From: tungkhanhh Date: Sun, 29 Sep 2024 23:23:22 +1000 Subject: [PATCH] fix: set up Java for backend in .yml file --- .github/workflows/main.yml | 16 +++++++++------- backend/pom.xml | 4 ++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5143bc9..f309413 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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' @@ -30,20 +30,22 @@ 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' - - 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/heroku-deploy@v3.13.15 with: heroku_api_key: ${{secrets.HEROKU_API_KEY}} @@ -56,4 +58,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" \ No newline at end of file diff --git a/backend/pom.xml b/backend/pom.xml index c8b3106..5fa7348 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -10,8 +10,8 @@ 11 UTF-8 - 1.8 - 1.8 + 11 + 11 3.13.2 1.13.0