Skip to content

feat: Youtube Viewer and Date Updation #32

feat: Youtube Viewer and Date Updation

feat: Youtube Viewer and Date Updation #32

Workflow file for this run

name: Deploy to Server
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up SSH
uses: webfactory/ssh-agent@v0.5.4
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Run deployment commands on server
run: |
ssh -o StrictHostKeyChecking=no ubuntu@gyanaangan.dspsc.live << 'EOF'
cd /home/ubuntu/gyanaangan-django
git pull origin main # Pull the latest changes from the repository
source /home/ubuntu/gyanaangan-django/venv/bin/activate # Activate virtual environment if needed
pip install -r requirements.txt
python manage.py migrate
python manage.py collectstatic --noinput
sudo systemctl restart gunicorn
sudo systemctl restart nginx
EOF