Add deploy
FastAPI CI / test (push) Successful in 1m6s

This commit is contained in:
m1000 committed 2026-11-13 02:43:24 +03:00
1 parent d7c280d7a5
commit 4769940a00
1 file changed
+10
+10
View File
@@ -29,3 +29,13 @@ jobs:
- name: Build Docker image - name: Build Docker image
run: docker build -t fastapi-demo:latest . run: docker build -t fastapi-demo:latest .
- name: Deploy application
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
docker rm -f fastapi-demo || true
docker run -d \
--name fastapi-demo \
--restart unless-stopped \
-p 127.0.0.1:8000:8000 \
fastapi-demo:latest