Skip to content

Commit

Permalink
try 164
Browse files Browse the repository at this point in the history
  • Loading branch information
AzizMukhtorjonov committed Jun 23, 2024
1 parent f94627e commit 5216659
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ jobs:
- name: Add server to known hosts
run: |
mkdir -p ~/.ssh
echo "${{ secrets.KNOWN_HOSTS }}" > ~/.ssh/known_hosts
echo "${{ secrets.KNOWN_HOSTS }}" >> ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts
deploy-on-server:
environment: Test
Expand All @@ -74,12 +75,12 @@ jobs:

run: |
echo $DIRECTORY
ssh -t $SERVER_USER@$SERVER_HOST << EOF
ssh -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_HOST << EOF
rm -rf $DIRECTORY && mkdir -p $DIRECTORY
EOF
scp -r * $SERVER_USER@$SERVER_HOST:$DIRECTORY
scp .env $SERVER_USER@$SERVER_HOST:$DIRECTORY/.env
ssh -t $SERVER_USER@$SERVER_HOST << EOF
scp -o StrictHostKeyChecking=no -r * $SERVER_USER@$SERVER_HOST:$DIRECTORY
scp -o StrictHostKeyChecking=no .env $SERVER_USER@$SERVER_HOST:$DIRECTORY/.env
ssh -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_HOST << EOF
echo "Starting deployment process..."
cd $DIRECTORY
sh deploy.sh
Expand Down

0 comments on commit 5216659

Please sign in to comment.