Add deploy step to CI workflow to auto-restart container on tag push
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -39,3 +39,11 @@ jobs:
|
||||
docker build -t $IMAGE:$TAG -t $IMAGE:latest .
|
||||
docker push $IMAGE:$TAG
|
||||
docker push $IMAGE:latest
|
||||
|
||||
- name: Deploy
|
||||
run: |
|
||||
IMAGE=git.bahamut.nitrix.one/dostulata/initiative
|
||||
TAG=${GITHUB_REF#refs/tags/}
|
||||
docker stop initiative || true
|
||||
docker rm initiative || true
|
||||
docker run -d --name initiative --restart unless-stopped -p 8080:80 $IMAGE:$TAG
|
||||
|
||||
Reference in New Issue
Block a user