diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3587a14..3c358a8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -29,14 +29,20 @@ jobs: with: node-version: 20 - - run: npm install -g pnpm + # installer pnpm et wait-on globalement + - run: | + npm install -g pnpm wait-on - # install uniquement les prod deps + # installer uniquement les deps prod - run: pnpm install --frozen-lockfile --prod - # démarrer le serveur et tester une route + # démarrer le serveur en arrière-plan - run: pnpm start & - - run: npx wait-on http://localhost:3000 + + # attendre que le serveur soit dispo (max 15s) + - run: wait-on http://localhost:3000 --timeout 15000 + + # vérifier la route principale - run: curl -f http://localhost:3000 || exit 1 deploy: