Skip to content

Commit dbea407

Browse files
authored
Merge pull request #3 from 0tuedon/retry-deployment
Retry deployment after 10 seconds 3 Times
2 parents eed1541 + 8a7df17 commit dbea407

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/build-public-inbox.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,14 @@ jobs:
4747
run: npm i -g @railway/cli
4848

4949
- name: Deploy
50-
run: railway up --service public-inbox
50+
run: | # This script retries the deployment 3 times before failing because railway sometimes fails to deploy
51+
n=0
52+
until [ "$n" -ge 3 ]
53+
do
54+
railway up --service public-inbox && break
55+
n=$((n+1))
56+
echo "Retrying deployment... attempt $n"
57+
sleep 10
58+
done
5159
env:
52-
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
60+
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}

0 commit comments

Comments
 (0)