From 6751e85d7dc83851d6307e40e45f46aaf9cc7be1 Mon Sep 17 00:00:00 2001 From: Dmitry Abramov Date: Sun, 14 Jul 2024 23:25:14 +0700 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=B2=20CICD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Спуливание ветки * Заполнение .env из секретов --- .github/workflows/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 00d5407..a1e6576 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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