diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 7ee4517d..7a025aef 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -25,7 +25,7 @@ jobs: shell: bash - - name: Update server and create new User + - name: Update server and repo uses: appleboy/ssh-action@master with: host: ${{ secrets.DO_SERVER_IP }} @@ -42,8 +42,8 @@ jobs: # Update Repository cd /home/$USER_NAME/$REPO_NAME - sudo -u www-data git pull - + sudo -u www-data git pull --recurse-submodules + # Activate Virtual Environment and install dependencies sudo -u $USER_NAME virtualenv env_dj source env_dj/bin/activate diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 6558f19c..8a114c5a 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -135,7 +135,10 @@ jobs: sudo systemctl status gunicorn sudo systemctl status nginx + + sudo -u ${{ secrets.USER_NAME }} git pull # change owner to home and everything sudo chown -R www-data:www-data /home +