Skip to content

Commit

Permalink
test deploy to production2
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegGsk committed Sep 24, 2024
1 parent a3c6648 commit f9fec85
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/production_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,12 @@ jobs:
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
run: ssh -vvv ${{ secrets.USERNAME }}@${{ secrets.HOST }} mkdir -p prodiction/${{ env.DEPLOY_PATH }}/infra

- name: Copy dev folder to VPS
run: |
# scp -r $GITHUB_WORKSPACE/infra/prod/ ${{ secrets.USERNAME }}@${{ secrets.HOST }}:${{ env.DEPLOY_PATH }}/infra/
# scp -r $GITHUB_WORKSPACE/infra/nginx/ ${{ secrets.USERNAME }}@${{ secrets.HOST }}:${{ env.DEPLOY_PATH }}/infra/
scp -r $GITHUB_WORKSPACE/infra/prod/ production@${{ secrets.HOST }}:${{ env.DEPLOY_PATH }}/infra/
scp -r $GITHUB_WORKSPACE/infra/nginx/ production@${{ secrets.HOST }}:${{ env.DEPLOY_PATH }}/infra/
# scp -r $GITHUB_WORKSPACE/infra/prod/ ${{ secrets.USERNAME }}@${{ secrets.HOST }}:prodiction/${{ env.DEPLOY_PATH }}/infra/
# scp -r $GITHUB_WORKSPACE/infra/nginx/ ${{ secrets.USERNAME }}@${{ secrets.HOST }}:prodiction/${{ env.DEPLOY_PATH }}/infra/
- name: Execute commands on VPS
uses: appleboy/ssh-action@master
Expand All @@ -131,7 +129,7 @@ jobs:
username: ${{ secrets.USERNAME }}
key: ${{ secrets.TEST_RSA_SECRET_KEY }}
script: |
cd ${{ env.DEPLOY_PATH }}
cd prodiction/${{ env.DEPLOY_PATH }}
rm .env
touch .env
Expand Down

0 comments on commit f9fec85

Please sign in to comment.