patch: update dependencies, improve setup configuration, and add Wind… #3
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
| name: Frontend CI/CD | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| paths: | |
| - 'networkmonitor/web/**' | |
| pull_request: | |
| branches: [ main, master ] | |
| paths: | |
| - 'networkmonitor/web/**' | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: networkmonitor/web | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: networkmonitor/web/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| deploy: | |
| needs: test | |
| if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to Vercel | |
| run: | | |
| echo "Frontend deployment is handled by Vercel's GitHub integration" | |
| echo "Ensure Vercel GitHub integration is enabled and points to networkmonitor/web directory" |