Skip to content

Commit

Permalink
fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
elenashovtyuk committed Sep 2, 2023
1 parent 560adb4 commit eaf2d8f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/deploy-bot-on-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
host: ${{ secrets.VM_HOST }}
username: ${{ secrets.VM_USER }}
password: ${{ secrets.VM_PASSWORD }}
source: "infra/prod/spread_wings_bot.service"
source: "infra/prod/"
target: /home/deploy/spread_wings_bot/infra/prod/
- name: ssh pull and start
uses: appleboy/ssh-action@master
Expand All @@ -29,7 +29,6 @@ jobs:
password: ${{ secrets.VM_PASSWORD }}
script: |
cd /home/deploy/spread_wings_bot/infra/prod/
git pull
rm .env
touch .env
Expand Down Expand Up @@ -71,10 +70,10 @@ jobs:
# Installing defend service for app
# Шаг с копированием в строках 16-23 можно заменить командой ниже - нужно тестировать
# scp infra/prod/spread_wings_bot.service .
cp -f /home/deploy/spread_wings_bot/infra/prod/spread_wings_bot.service /etc/systemd/system/spread_wings_bot.service
systemctl daemon-reload
systemctl restart spread_wings_bot.service
# scp infra/prod/spread_wings_bot.service ${{ secrets.VM_USER }}@${{ secrets.VM_HOST }}:/spread_wings_bot/infra/prod/
sudo cp -f /home/deploy/spread_wings_bot/infra/prod/spread_wings_bot.service /etc/systemd/system/spread_wings_bot.service
sudo systemctl daemon-reload
sudo systemctl restart spread_wings_bot.service
# Installing the app
docker-compose -f docker-compose.stage.yaml stop
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/deploy-bot-on-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
host: ${{ secrets.VM_HOST }}
username: ${{ secrets.VM_USER }}
password: ${{ secrets.VM_PASSWORD }}
source: "infra/dev/spread_wings_bot.service"
source: "infra/dev/"
target: /home/deploy/spread_wings_bot/infra/dev/
- name: ssh pull and start
uses: appleboy/ssh-action@master
Expand All @@ -29,7 +29,6 @@ jobs:
password: ${{ secrets.VM_PASSWORD }}
script: |
cd /home/deploy/spread_wings_bot/infra/dev/
git pull
rm .env
touch .env
Expand Down Expand Up @@ -71,10 +70,10 @@ jobs:
# Installing defend service for app
# Шаг с копированием в строках 16-23 можно заменить командой ниже - нужно тестировать
# scp infra/dev/spread_wings_bot.service .
cp -f /home/deploy/spread_wings_bot/infra/dev/spread_wings_bot.service /etc/systemd/system/spread_wings_bot.service
systemctl daemon-reload
systemctl restart spread_wings_bot.service
# scp infra/dev/spread_wings_bot.service ${{ secrets.VM_USER }}@${{ secrets.VM_HOST }}:/spread_wings_bot/infra/dev/
sudo cp -f /home/deploy/spread_wings_bot/infra/dev/spread_wings_bot.service /etc/systemd/system/spread_wings_bot.service
sudo systemctl daemon-reload
sudo systemctl restart spread_wings_bot.service
# Installing the app
docker-compose -f docker-compose.stage.yaml stop
Expand Down

0 comments on commit eaf2d8f

Please sign in to comment.