Merge pull request #23 from PKA-OpenDynamics/develop #54
This file contains hidden or 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
| # Copyright (c) 2025 CityLens Contributors | |
| # Licensed under the GNU General Public License v3.0 (GPL-3.0) | |
| name: Web Dashboard CI | |
| on: | |
| push: | |
| branches: [main, develop] | |
| paths: | |
| - 'web-dashboard/**' | |
| pull_request: | |
| branches: [main, develop] | |
| paths: | |
| - 'web-dashboard/**' | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: './web-dashboard/package-lock.json' | |
| - name: Install dependencies | |
| working-directory: ./web-dashboard | |
| run: npm ci | |
| - name: Run linter | |
| working-directory: ./web-dashboard | |
| run: npm run lint | |
| - name: Build | |
| working-directory: ./web-dashboard | |
| run: npm run build | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: web-dashboard-build | |
| path: ./web-dashboard/dist | |
| build-docker: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| if: github.event_name == 'push' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build Docker image | |
| working-directory: ./web-dashboard | |
| run: | | |
| docker build -t citylens-web:${{ github.sha }} . |