Files
JioDownloader/.gitea/workflows/deploy.yaml
sam eef4d8e0e2
Some checks failed
Docker Deploy / build-and-deploy (push) Failing after 34s
aas
2026-02-06 17:55:40 +00:00

54 lines
1.7 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 --no-cache -t my-jiodown-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: Remove Old Container and Free Port
run: |
# 1. Stop and remove by NAME (what we had before)
docker stop my-jiodown-app || true
docker rm my-jiodown-app || true
# 2. EMERGENCY: Stop any container actually using port 9002
# This finds the ID of any container bound to 9002 and kills it
PORT_OWNER=$(docker ps -q --filter "publish=8501")
if [ ! -z "$PORT_OWNER" ]; then
docker stop $PORT_OWNER
docker rm $PORT_OWNER
fi
- name: Start New Container
run: |
docker run -d \
--name my-jiodown-app \
-p 8501:8501 \
-v /media/devmon/Backup Plus/songdown:/app/downloads \
--restart unless-stopped \
my-jiodown-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