mirror of
https://github.com/tiennm99/caro.git
synced 2026-09-15 06:19:32 +00:00
- Replace outdated Build.yml (v2 actions, JDK 1.8, 3-OS matrix) with modern workflow (v4 actions, JDK 21, single ubuntu runner) - Add separate web client build job - Add deploy-pages.yml for auto-deploying web-client to GitHub Pages on push to master (web-client/** changes only) - Set Vite base path to /caro/ for GitHub Pages compatibility
39 lines
859 B
YAML
39 lines
859 B
YAML
name: Build & Test
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
paths-ignore: ['**/*.md', '.gitignore']
|
|
pull_request:
|
|
branches: [master]
|
|
paths-ignore: ['**/*.md', '.gitignore']
|
|
|
|
jobs:
|
|
build-server:
|
|
name: Build Server (Java)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: 21
|
|
cache: maven
|
|
- run: mvn clean verify
|
|
|
|
build-web-client:
|
|
name: Build Web Client
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: web-client
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
cache-dependency-path: web-client/package-lock.json
|
|
- run: npm ci
|
|
- run: npm run build
|