deploy: wait a bit longer and only publish a new version if the workflow or the api code has changed
Pedro Lucas Porcellis porcellis@eletrotupi.com · 4 months ago
9e17ee23b1f8aaadcb0d133d08598459f8fb6049 Browse filesParents
150a90aChanged files
1
Additions
+4
Deletions
-1
.github/workflows/deploy.yml
1 1
name: Deploy
2 2
3 3
on:
4 4
push:
5 5
branches:
6 6
- master # goes for production now, will become staging later on
7 7
- production
8 +
paths:
9 +
- 'api/**'
10 +
- '.github/workflows/deploy.yml'
8 11
9 12
env:
10 13
REGISTRY: ghcr.io
11 14
IMAGE_NAME: ${{ github.repository }}
12 15
77 80
78 81
sed -i "s/^IMAGE_TAG=.*/IMAGE_TAG=latest/" .env
79 82
80 83
docker compose up -d --no-deps --force-recreate api
81 84
82 -
sleep 3
85 +
sleep 5
83 86
# Dump the logs for a while
84 87
docker compose logs --tail=50 api