test runner - fix v12
Some checks failed
Some checks failed
This commit is contained in:
parent
31400f6420
commit
d5720b7cc1
1 changed files with 6 additions and 14 deletions
|
|
@ -124,21 +124,13 @@ jobs:
|
|||
- name: Setup SSH
|
||||
run: |
|
||||
apt-get update && apt-get install -y openssh-client
|
||||
mkdir -p ~/.ssh
|
||||
chmod 700 ~/.ssh
|
||||
mkdir -p /root/.ssh
|
||||
chmod 700 /root/.ssh
|
||||
|
||||
# Записываем приватный ключ
|
||||
cat > ~/.ssh/deploy_key << 'KEYEOF'
|
||||
${{ secrets.SSH_PRIVATE_KEY }}
|
||||
KEYEOF
|
||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" | sed 's/\r$//' > /root/.ssh/deploy_key
|
||||
chmod 600 /root/.ssh/deploy_key
|
||||
|
||||
chmod 600 ~/.ssh/deploy_key
|
||||
|
||||
echo "=== Fingerprint ключа ==="
|
||||
ssh-keygen -lf ~/.ssh/deploy_key
|
||||
|
||||
echo "=== Добавляем хост в known_hosts ==="
|
||||
ssh-keyscan -p ${{ env.DEPLOY_PORT }} -H ${{ env.DEPLOY_HOST }} >> ~/.ssh/known_hosts 2>/dev/null || true
|
||||
ssh-keyscan -p ${{ env.DEPLOY_PORT }} -H ${{ env.DEPLOY_HOST }} > /root/.ssh/known_hosts 2>/dev/null || true
|
||||
|
||||
- name: Add host to known_hosts
|
||||
run: |
|
||||
|
|
@ -146,7 +138,7 @@ jobs:
|
|||
|
||||
- name: Deploy to VPS
|
||||
run: |
|
||||
ssh -p ${{ env.DEPLOY_PORT }} ${{ env.DEPLOY_USER }}@${{ env.DEPLOY_HOST }} << 'DEPLOY_SCRIPT'
|
||||
ssh -p ${{ env.DEPLOY_PORT }} -i /root/.ssh/deploy_key -o StrictHostKeyChecking=no -o BatchMode=yes ${{ env.DEPLOY_USER }}@${{ env.DEPLOY_HOST }} << 'DEPLOY_SCRIPT'
|
||||
set -e
|
||||
|
||||
APP_NAME="flask-app"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue