Skip to content

refactor:change category from list to boolean #48

refactor:change category from list to boolean

refactor:change category from list to boolean #48

Workflow file for this run

name: Django EC2 Deploy
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
ci:
name: 'Django CI'
runs-on: ubuntu-20.04
strategy:

Check failure on line 13 in .github/workflows/deploy.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/deploy.yml

Invalid workflow file

You have an error in your yaml syntax on line 13
max-parallel: 4
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: create-json
id: create-json
uses: jsdaniell/[email protected]
with:
name: "secrets.json"
json: ${{ secrets.SECERT_JSON }}
- name: Run Tests
run: |
python manage.py test
cd:
name: 'Django CD'
needs: ci
runs-on: Amazon Linux 2023.4.20240513
steps:
- name: EC2 ssh connection test
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }} # 연결할 EC2
username: ${{ secrets.SSH_USERNAME }} # 사용자
key: ${{ secrets.SSH_PEM }} # pem 파일 내용
command_timeout: 3m # timeout 시간 설정
script: |
sudo apt-get update
sudo apt-get -y upgrade
cd {~/Back-end/}
source {venv}/bin/activate
git pull
sudo lsof -t -i tcp:8000 | xargs kill -9
pip install -r requirements.txt
python manage.py makemigrations
python manage.py migrate
nohup gunicorn --bind 0.0.0.0:8000 {pure_plate}.wsgi > nohup.out 2> nohup.err < /dev/null &
exit 0