Skip to content

make root_dir, env_dir configurable #22

make root_dir, env_dir configurable

make root_dir, env_dir configurable #22

Workflow file for this run

name: Django CI
on:
push:
branches: [ "main", "staging" ]
pull_request:
branches: [ "main", "staging" ]
jobs:
build:
environment: ${{ github.ref_name }}
name: "Deploy to ${{ github.ref_name }}"
runs-on: ubuntu-latest
steps:
- name: Configure SSH
env:
SSH_USER: ${{ secrets.SSH_USER }}
SSH_KEY: ${{ secrets.SSH_KEY }}
SSH_HOST: ${{ secrets.SSH_HOST }}
run: |
mkdir -p ~/.ssh/
echo "$SSH_KEY" > ~/.ssh/server.key
chmod 600 ~/.ssh/server.key
cat >>~/.ssh/config <<END
Host server
HostName $SSH_HOST
User $SSH_USER
IdentityFile ~/.ssh/server.key
StrictHostKeyChecking no
END
- name: Deploy to Server
run: |

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

View workflow run for this annotation

GitHub Actions / Django CI

Invalid workflow file

The workflow is not valid. .github/workflows/django.yml (Line: 32, Col: 14): Unrecognized named-value: 'ROOT_DIR'. Located at position 1 within expression: ROOT_DIR
ssh server '
cd ${{ ROOT_DIR }} &&
git pull origin main &&
source ${{ ENV_DIR }}bin/activate &&
pip install -r requirements/production.txt &&
python manage.py migrate --settings=config.settings.production &&
python manage.py collectstatic --noinput --settings=config.settings.production &&
supervisorctl restart django
'