Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 18 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,18 @@ name: RetroIPTVGuide CI/CD

on:
push:
branches: [ main ]
branches:
- main
- dev
- feature/**
workflow_dispatch:

env:
PYTHON_VERSION: "3.12"
DEPLOY_PATH: "/opt/retroiptvguide"

jobs:
clone:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Clone confirmation
run: echo "✅ Repository cloned successfully."

build:
runs-on: ubuntu-latest
needs: clone
steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand All @@ -46,15 +40,17 @@ jobs:
echo "🧪 Running syntax and basic runtime tests..."
python -m unittest discover -s tests || echo "No tests found, skipping."

deploy:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Simulate Deployment
run: |
echo "🚀 Simulating deployment to ${{ env.DEPLOY_PATH }}"
mkdir -p ${{ env.DEPLOY_PATH }}
cp -r . ${{ env.DEPLOY_PATH }}/

# deploy:
# runs-on: ubuntu-latest
# needs: test
# if: github.ref == 'refs/heads/dev'
# steps:
# - uses: actions/checkout@v4
# - name: Deploy to dev server
# uses: appleboy/scp-action@v0.1.4
# with:
# host: ${{ secrets.DEPLOY_HOST }}
# username: ${{ secrets.DEPLOY_USER }}
# key: ${{ secrets.DEPLOY_SSH_KEY }}
# source: "."
# target: "/opt/retroiptvguide-dev"