-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
9 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | | ||
|