This commit is contained in:
+15
-14
@@ -17,19 +17,20 @@ jobs:
|
||||
|
||||
- name: Setup SSH
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
|
||||
ssh-keyscan -p ${{ secrets.DEPLOY_PORT }} ${{ secrets.DEPLOY_HOST }} >> ~/.ssh/known_hosts
|
||||
mkdir -p ~/.ssh
|
||||
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
|
||||
ssh-keyscan -p ${{ secrets.DEPLOY_PORT }} ${{ secrets.DEPLOY_HOST }} >> ~/.ssh/known_hosts
|
||||
|
||||
- name: Test SSH connection
|
||||
run: |
|
||||
ssh -i ~/.ssh/id_ed25519 \
|
||||
-p ${{ secrets.DEPLOY_PORT }} \
|
||||
-o StrictHostKeyChecking=yes \
|
||||
${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }} \
|
||||
"echo SSH connection successful"
|
||||
ssh -i ~/.ssh/id_ed25519 \
|
||||
-p ${{ secrets.DEPLOY_PORT }} \
|
||||
-o StrictHostKeyChecking=yes \
|
||||
-o UpdateHostKeys=no \
|
||||
${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }} \
|
||||
"echo SSH OK"
|
||||
|
||||
- name: Ensure remote directory exists
|
||||
run: |
|
||||
@@ -40,7 +41,7 @@ jobs:
|
||||
|
||||
- name: Deploy via rsync
|
||||
run: |
|
||||
rsync -avz --delete \
|
||||
-e "ssh -i ~/.ssh/id_ed25519 -p ${{ secrets.DEPLOY_PORT }}" \
|
||||
index.html styles.css de/ en/ \
|
||||
${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}:${{ secrets.DEPLOY_PATH }}
|
||||
rsync -avz --delete \
|
||||
-e "ssh -i ~/.ssh/id_ed25519 -p ${{ secrets.DEPLOY_PORT }} -o UpdateHostKeys=no" \
|
||||
index.html styles.css de/ en/ \
|
||||
${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}:${{ secrets.DEPLOY_PATH }}
|
||||
Reference in New Issue
Block a user