Skip to content

feat: Add custom error pages and handlers #23

feat: Add custom error pages and handlers

feat: Add custom error pages and handlers #23

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/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Run deployment commands on server
run: |
ssh -o StrictHostKeyChecking=no [email protected] << '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