forked from CetinaLuka/ZimskaSola2024
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3161033
commit c491478
Showing
1 changed file
with
31 additions
and
30 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,44 @@ | ||
name: CI/CD Workflow | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-backend: | ||
runs-on: ubuntu-latest | ||
build-backend: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
|
||
- name: Build with Maven | ||
run: mvn -B package --file backend/pom.xml | ||
- name: Build with Maven | ||
run: mvn -B package --file backend/pom.xml | ||
|
||
build-frontend: | ||
needs: build-backend | ||
runs-on: ubuntu-latest | ||
build-frontend: | ||
needs: build-backend | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v2.4.1 | ||
with: | ||
node-version: '14' | ||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v2.4.1 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Install dependencies for frontend | ||
run: npm ci --prefix frontend | ||
- name: Install dependencies for frontend | ||
run: npm ci --prefix frontend | ||
|
||
- name: Build frontend | ||
run: npm run build --prefix frontend | ||
- name: Build frontend | ||
run: npm run build --prefix frontend |