Files
caro/.github/workflows/deploy-pages.yml
T
tiennm99 e8c08139db ci: modernize GitHub Actions, add Pages deployment
- 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
2026-04-10 10:29:36 +07:00

49 lines
981 B
YAML

name: Deploy Web Client to GitHub Pages
on:
push:
branches: [master]
paths:
- 'web-client/**'
- '.github/workflows/deploy-pages.yml'
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
name: Build
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
- uses: actions/upload-pages-artifact@v3
with:
path: web-client/dist
deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4