Skip to content

Commit

Permalink
test deploy to production13
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegGsk committed Sep 25, 2024
1 parent d7c9c22 commit d2ce8b8
Showing 1 changed file with 22 additions and 13 deletions.
35 changes: 22 additions & 13 deletions .github/workflows/production_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,20 +105,29 @@ jobs:
with:
ref: feature/convert_ci-cd_to_the_prod

- name: Set up SSH
run: |
mkdir -p ~/.ssh
chmod 700 ~/.ssh
# Добавляем строку с указанием хоста для сканирования
ssh-keyscan ${{ secrets.HOST }} >> ~/.ssh/known_hosts
# - name: Set up SSH
# run: |
# mkdir -p ~/.ssh
# chmod 700 ~/.ssh
# ssh-keyscan ${{ secrets.HOST }} >> ~/.ssh/known_hosts

chmod 644 ~/.ssh/known_hosts
echo "${{ secrets.TEST_RSA_SECRET_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
- name: Create folder for deploy
run: ssh -vvv ${{ secrets.USERNAME }}@${{ secrets.HOST }} mkdir -p ${{ env.DEPLOY_PATH }}/infra

# chmod 644 ~/.ssh/known_hosts
# echo "${{ secrets.TEST_RSA_SECRET_KEY }}" > ~/.ssh/id_rsa
# chmod 600 ~/.ssh/id_rsa
# - name: Create folder for deploy
# run: ssh -vvv ${{ secrets.USERNAME }}@${{ secrets.HOST }} mkdir -p ${{ env.DEPLOY_PATH }}/infra
- name: Copy docker-compose.yml via ssh
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.TEST_RSA_SECRET_KEY }}
# passphrase: ${{ secrets.SSH_PASSPHRASE }}
source: "infra/"
target: "prodiction/${{ env.DEPLOY_PATH }}/"
overwrite: true
strip_components: 1

- name: Copy dev folder to VPS
run: |
# scp -r $GITHUB_WORKSPACE/infra/prod/ ${{ secrets.USERNAME }}@${{ secrets.HOST }}:${{ env.DEPLOY_PATH }}/infra/
Expand Down

0 comments on commit d2ce8b8

Please sign in to comment.