Build triggered by yb175 on refs/pull/140/merge #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 : Backend 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: backend | |
| 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 : Generate Prisma client | |
| run: npx prisma generate | |
| - name: Build the backend production server | |
| run: npm run build | |
| - name: Start the backend production server | |
| run: | | |
| npm run start & | |
| sleep 5 | |
| - name: Verify server is running | |
| run: | | |
| for i in {1..5}; do | |
| curl -I http://localhost:3000 && exit 0 | |
| sleep 2 | |
| done | |
| exit 1 | |
| - run: echo "✅ Backend production server is up and running!" |