Skip to content

Commit

Permalink
test deploy to production27
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegGsk committed Sep 26, 2024
1 parent 5362f84 commit 29f9fbe
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions .github/workflows/production_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,33 +105,27 @@ jobs:
uses: actions/checkout@v4
# with:
# ref: dev

- name: Configure SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.TEST_RSA_SECRET_KEY }}
- name: Set up SSH
run: |
cd ${{ github.workspace }}
ssh-keyscan -t rsa 84.201.161.166 >> ~/.ssh/known_hosts
# mkdir -p ~/.ssh
# chmod 700 ~/.ssh
# ssh-keyscan -H 84.201.161.166 > ~/.ssh/known_hosts
# chmod 644 ~/.ssh/known_hosts
# echo "${{ secrets.TEST_RSA_SECRET_KEY }}" > ~/.ssh/id_rsa
# chmod 600 ~/.ssh/id_rsa
which ssh-agent || (sudo apk update && sudo apk add openssh-client)
which rsync || (sudo apk update && sudo apk add rsync)
mkdir -p ~/.ssh
chmod 700 ~/.ssh
touch ~/.ssh/private.key
touch ~/.ssh/known_hosts
chmod 600 ~/.ssh/private.key
echo -e "${{ secrets.TEST_RSA_SECRET_KEY }}" | tr -d '\r' > ~/.ssh/private.key
# Append keyscan output into known hosts
ssh-keyscan -H 84.201.161.166 >> ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts

- name: Check SSH key
run: ssh-keygen -lf ~/.ssh/private.key
# - name: Check SSH key
# run: ssh-keygen -lf ~/.ssh/private.key

- name: Create folder for deploy
run: ssh -vvv ${{ env.USERNAME }}@${{ secrets.HOST }} mkdir -p ${{ env.DEPLOY_PATH }}/infra
run: ssh -vvv ${{ env.USERNAME }}@84.201.161.166 mkdir -p ${{ env.DEPLOY_PATH }}/infra

- name: Copy dev folder to VPS
run: |
Expand Down

0 comments on commit 29f9fbe

Please sign in to comment.