https://dev.kronoz.win/r/marzneshin.git
1name: Dashboard CI
2
3on:
4
5 push:
6 paths:
7 - 'app/dashboard/**'
8 branches: [ "master" ]
9 pull_request:
10 paths:
11 - 'app/dashboard/**'
12
13jobs:
14 build:
15 env:
16 VITE_BASE_API: /api/
17 runs-on: ubuntu-latest
18 defaults:
19 run:
20 working-directory: ./app/dashboard
21 steps:
22 - uses: actions/checkout@v4
23
24 - name: Use Node.js
25 uses: actions/setup-node@v3
26 with:
27 node-version: '20.0'
28 cache: 'npm'
29 cache-dependency-path: 'app/dashboard/package-lock.json'
30
31 - name: Install dependencies
32 run: npm install
33
34 - name: Lint Dashboard
35 run: npm run lint
36
37 - name: Build Dashboard
38 run: npm run build --if-present -- --outDir build --base '/dashboard/'
39
40 - name: Upload a Build Artifact
41 uses: actions/upload-artifact@v4.2.0
42 with:
43 name: artifact
44 path: app/dashboard/build