diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 437be0e..3051bc8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,6 +25,9 @@ jobs: - name: Install dependencies run: npm install + - name: Build frontend + run: npm run build + - name: Run tests run: npm test @@ -37,6 +40,8 @@ jobs: docker: runs-on: ubuntu-latest needs: test + # Only run docker build on push to main, not PRs + if: github.event_name == 'push' && github.ref == 'refs/heads/main' steps: - uses: actions/checkout@v4 @@ -50,35 +55,3 @@ jobs: sleep 10 curl -f http://localhost:3000/api/health || exit 1 docker stop ohc-test - - build-electron: - runs-on: ${{ matrix.os }} - needs: test - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - - steps: - - uses: actions/checkout@v4 - - - name: Use Node.js - uses: actions/setup-node@v4 - with: - node-version: 20.x - - - name: Install dependencies - run: npm install - - - name: Build Electron app - run: npm run electron:build - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: electron-${{ matrix.os }} - path: dist/ - retention-days: 7