Skip to content

feat: improved logs for websockets #88

feat: improved logs for websockets

feat: improved logs for websockets #88

Workflow file for this run

name: CI/CD Chicmoz Prod
on:
push:
branches:
- production
pull_request:
branches:
- production
types:
- closed
jobs:
build_and_deploy:
runs-on:
labels: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Skaffold
run: |
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64
sudo install skaffold /usr/local/bin/
shell: bash
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Log in to DigitalOcean Container Registry with short-lived credentials
run: doctl registry login --expiry-seconds 1200
- name: Cleanup old images
run: |
bash -x "scripts/production/cleanup-registry.sh"
- name: Save DigitalOcean kubeconfig
run: doctl kubernetes cluster kubeconfig save "chicmoz-prod"
- name: Deploy to cluster with Skaffold
run: |
MAX_RETRIES=3
RETRY_DELAY=10
for i in $(seq 1 $MAX_RETRIES); do
if bash -x scripts/production/deploy.sh; then
echo "Deployment successful"
exit 0
fi
echo "Attempt $i failed. Retrying in $RETRY_DELAY seconds..."
sleep $RETRY_DELAY
done
echo "Deployment failed after $MAX_RETRIES attempts"
exit 1