gitea action test
This commit is contained in:
19
.github/workflows/deploy.yml
vendored
19
.github/workflows/deploy.yml
vendored
@@ -29,21 +29,12 @@ jobs:
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
# installer pnpm et wait-on globalement
|
||||
- run: |
|
||||
npm install -g pnpm wait-on
|
||||
|
||||
# installer uniquement les deps prod
|
||||
- run: npm install -g pnpm wait-on
|
||||
- run: pnpm install --frozen-lockfile --prod
|
||||
|
||||
# démarrer le serveur en arrière-plan
|
||||
- run: pnpm start &
|
||||
|
||||
# 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
|
||||
- run: pnpm start > server.log 2>&1 &
|
||||
- run: tail -n 20 server.log
|
||||
- run: wait-on http://localhost:3000 --timeout 60000
|
||||
- run: curl -f http://localhost:3000 || (cat server.log && exit 1)
|
||||
|
||||
deploy:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
Reference in New Issue
Block a user