Skip to content
This repository was archived by the owner on Jan 2, 2026. It is now read-only.

Commit d7ea38a

Browse files
committed
Remove existing staging services before deploying
1 parent 97c8754 commit d7ea38a

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ on:
66
workflow_dispatch:
77

88
env:
9-
SERVICE_NAME: 'ai'
10-
NETWORK: 'prod_swecc-network'
11-
CPU_LIMIT: '0.5'
12-
MEMORY_LIMIT: '256M'
13-
CPU_RESERVE: '0.1'
14-
MEMORY_RESERVE: '128M'
15-
IMAGE: 'swecc-ai'
9+
SERVICE_NAME: "ai"
10+
NETWORK: "prod_swecc-network"
11+
CPU_LIMIT: "0.5"
12+
MEMORY_LIMIT: "256M"
13+
CPU_RESERVE: "0.1"
14+
MEMORY_RESERVE: "128M"
15+
IMAGE: "swecc-ai"
1616
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
1717
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
18-
CONFIG_NAME: 'ai_env'
18+
CONFIG_NAME: "ai_env"
1919

2020
jobs:
2121
push_to_dockerhub:
@@ -82,6 +82,9 @@ jobs:
8282
run: |
8383
STAGING_NAME="${{ env.SERVICE_NAME }}-staging"
8484
85+
echo "Ensure no existing staging service"
86+
docker service rm $STAGING_NAME || true
87+
8588
echo "Creating temporary service: $STAGING_NAME"
8689
docker service create \
8790
--name "$STAGING_NAME" \

0 commit comments

Comments
 (0)