Files
file-explorer/.gitea/workflows/deploy.yaml
sam 9d88dbc90f
All checks were successful
Docker Deploy / build-and-deploy (push) Successful in 5s
ss
2026-02-06 09:49:19 +00:00

40 lines
1.1 KiB
YAML

name: Docker Deploy
on: [push]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Build Docker Image
run: |
docker build -t my-local-app:latest .
# - name: Remove Old Container
# run: |
# # Use '|| true' to force a success exit code even if the container is missing
# docker stop my-running-app || true
# docker rm my-running-app || true
# - name: Start New Container
# run: |
# docker run -d \
# --name my-running-app \
# -p 5000:5000 \
# --restart unless-stopped \
# flask-app:latest
- name: Deploy to CasaOS (Docker)
run: |
# Stop and remove the old container if it exists
docker stop my-running-app || true
docker rm my-running-app || true
# Run the new container
docker run -d \
--name my-running-app \
-p 9002:5005 \
--restart always \
my-local-app:latest