Skip to content

Commit

Permalink
Merge pull request #383 from Studio-Yandex-Practicum/fix/deploy
Browse files Browse the repository at this point in the history
fix: change port of SSH
  • Loading branch information
ADesBiysk authored Jul 25, 2023
2 parents a9726c0 + f5473ab commit 40e587f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/deploy_stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
host: ${{ secrets.HOST }}
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.SSH_PASSWORD }}
port: ${{ secrets.SSH_PORT }}
source: "docker-compose.stage.yaml,nginx/default.conf"
target: ${{ env.DEPLOY_PATH }}

Expand All @@ -77,6 +78,7 @@ jobs:
host: ${{ secrets.HOST }}
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.SSH_PASSWORD }}
port: ${{ secrets.SSH_PORT }}
script: |
cd ${{ env.DEPLOY_PATH }}
mv docker-compose.stage.yaml docker-compose.yaml
Expand All @@ -95,8 +97,8 @@ jobs:
echo MAIL_PASSWORD=${{ secrets.MAIL_PASSWORD }} >> .env
echo ORGANIZATIONS_EMAIL=${{ secrets.ORGANIZATIONS_EMAIL }} >> .env
echo SECRET_KEY=${{ secrets.SECRET_KEY }} >> .env
echo ROOT_PATH=${{ secrets.ROOT_PATH }} >> .env
echo TZ=${{ secrets.TZ }} >> .env
echo ROOT_PATH=${{ secrets.ROOT_PATH }} >> .env
echo DEBUG=${{ secrets.DEBUG }} >> .env
start_application:
Expand All @@ -113,6 +115,7 @@ jobs:
host: ${{ secrets.HOST }}
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.SSH_PASSWORD }}
port: ${{ secrets.SSH_PORT }}
script: |
cd ${{ env.DEPLOY_PATH }}
docker image prune -f
Expand All @@ -121,14 +124,14 @@ jobs:
docker-compose --file docker-compose.yaml stop
docker-compose --file docker-compose.yaml rm backend
docker-compose --file docker-compose.yaml rm frontend
rm -r frontend
docker-compose --file docker-compose.yaml up -d
- name: Making migrations
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.SSH_PASSWORD }}
port: ${{ secrets.SSH_PORT }}
script: |
cd ${{ env.DEPLOY_PATH }}
docker-compose exec -T -w ${{ env.WORK_DIR }} backend alembic upgrade head
Expand Down

0 comments on commit 40e587f

Please sign in to comment.