Skip to content

Commit

Permalink
Merge pull request #91 from QActf/fix/BCK-60_environment_variables_cicd
Browse files Browse the repository at this point in the history
Добавил в CICD
  • Loading branch information
kokhlo authored Jul 15, 2024
2 parents ba1a7c0 + 6751e85 commit 71d635a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,18 @@ jobs:
username: ${{ secrets.USER }}
key: ${{ secrets.SSH_KEY }}
script: |
cd backend/
git pull
cd backend/infra
rm .env
touch .env
echo DATABASE_URL=${{ secrets.DATABASE_URL }} >> .env
echo EMAIL_FROM=${{ secrets.EMAIL_FROM }} >> .env
echo EMAIL_HOST=${{ secrets.EMAIL_HOST }} >> .env
echo EMAIL_PORT=${{ secrets.EMAIL_PORT }} >> .env
echo EMAIL_HOST_USER=${{ secrets.EMAIL_HOST_USER }} >> .env
echo EMAIL_HOST_PASSWORD=${{ secrets.EMAIL_HOST_PASSWORD }} >> .env
echo HOST=${{ secrets.HOST }} >> .env
echo ${{ secrets.SUDO_PASSWORD }} | sudo -S docker compose down
echo ${{ secrets.SUDO_PASSWORD }} | sudo -S docker rmi infra-backend:latest
echo ${{ secrets.SUDO_PASSWORD }} | sudo -S docker compose up -d --build

0 comments on commit 71d635a

Please sign in to comment.