fix copying
All checks were successful
CI/CD Pipeline / lint-sast (push) Successful in 2m35s
CI/CD Pipeline / deploy (push) Successful in 28s

This commit is contained in:
Arseniy Sitnikov 2025-05-18 14:57:51 +03:00
parent 064e187f8a
commit d4eab71590

View File

@ -18,7 +18,7 @@ jobs:
with: with:
python-version: '3.12' python-version: '3.12'
- name: Install flake8 in venv - name: Run linter (flake8)
run: | run: |
python -m venv venv python -m venv venv
source venv/bin/activate source venv/bin/activate
@ -50,7 +50,7 @@ jobs:
if [[ "$GITHUB_REF" == "refs/heads/main" ]]; then if [[ "$GITHUB_REF" == "refs/heads/main" ]]; then
TARGET=${{ secrets.PROD_SERVER }} TARGET=${{ secrets.PROD_SERVER }}
fi fi
scp -r . "$TARGET:/home/deploy/app" scp -r . "$TARGET:~/app"
- name: Deploy app remotely - name: Deploy app remotely
run: | run: |
@ -58,4 +58,4 @@ jobs:
if [[ "$GITHUB_REF" == "refs/heads/main" ]]; then if [[ "$GITHUB_REF" == "refs/heads/main" ]]; then
TARGET=${{ secrets.PROD_SERVER }} TARGET=${{ secrets.PROD_SERVER }}
fi fi
ssh "$TARGET" 'cd /home/deploy/app && bash deploy.sh' ssh "$TARGET" 'cd ~/app && bash deploy.sh'