Skip to content

[SETTINGS] 자동 재배포 설정 #197

[SETTINGS] 자동 재배포 설정

[SETTINGS] 자동 재배포 설정 #197

Workflow file for this run

name: Django EC2 Deploy
on:
push:
branches: [main, cd]
pull_request:
branches: [main, cd]
jobs:
cd:

Check failure on line 10 in .github/workflows/django.yml

View workflow run for this annotation

GitHub Actions / Django EC2 Deploy

Invalid workflow file

The workflow is not valid. .github/workflows/django.yml (Line: 10, Col: 3): The workflow must contain at least one job with no dependencies.
name: "Django CD"
needs: ci
runs-on: ubuntu-20.04
steps:
- name: EC2 ssh connection test
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_PEM }}
command_timeout: 3m
script: |
sudo apt-get update
sudo apt-get -y upgrade
cd cau-likelion-django
source venv/bin/activate
git pull origin main
sudo lsof -t -i tcp:8000 | xargs kill -9
pip install -r requirements.txt
python manage.py makemigrations
python manage.py migrate
nohup python manage.py runserver 0.0.0.0:8000 &
exit 0