Build triggered by yb175 on refs/heads/main #109
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 Production Server | |
| run-name: Build triggered by ${{ github.actor }} on ${{ github.ref }} | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| pull_request: | |
| jobs : | |
| Build-Frontend-Production-Server: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: frontend | |
| steps: | |
| - name: Checkout repository code | |
| uses: actions/checkout@v5 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build the frontend production server | |
| run: npm run build | |
| - name: Start the frontend production server | |
| run: | | |
| npm run preview & | |
| sleep 5 | |
| - name: Verify server is running | |
| run: | | |
| for i in {1..5}; do | |
| curl -I http://localhost:4173 && exit 0 | |
| sleep 2 | |
| done | |
| exit 1 | |
| - run: echo "✅ Frontend production server is up and running!" |