Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/workflows/backend-cd-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,20 @@ jobs:
username: ${{ secrets.DEVELOP_SERVER_USER }}
key: ${{ secrets.DEVELOP_SSH_PRIVATE_KEY }}
port: ${{ secrets.DEVELOP_SERVER_PORT }}
script: ${{ secrets.DEVELOP_DEPLOY_SCRIPT_PATH }}
script: |
for attempt in 1 2; do
echo "> Deploy attempt ${attempt}/2"
if ${{ secrets.DEVELOP_DEPLOY_SCRIPT_PATH }}; then
echo "> Deploy succeeded on attempt ${attempt}"
exit 0
fi
if [ "${attempt}" -lt 2 ]; then
echo "> Deploy script failed. Retrying in 30 seconds..."
sleep 30
fi
done
echo "> Deploy failed after retries."
exit 1

- name: Notify Slack - Deploy Result
if: always()
Expand Down