1 parent
d7c280d7a5
commit
4769940a00
1 file changed
+10
@@ -29,3 +29,13 @@ jobs:
|
||||
|
||||
- name: Build Docker image
|
||||
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
|
||||
Reference in new issue
Block a user