Correct key usage back to normal

This commit is contained in:
Christbru 2025-10-18 20:19:56 -05:00
commit 2075c252f6

View file

@ -53,25 +53,12 @@ jobs:
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max
- name: Prepare SSH key
shell: bash
run: |
mkdir -p ~/.ssh
chmod 700 ~/.ssh
# Write private key
printf "%s" "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
# Pre-populate known_hosts to avoid interactive prompt
ssh-keyscan -H "${{ secrets.SERVER_HOST }}" >> ~/.ssh/known_hosts || true
chmod 644 ~/.ssh/known_hosts
- name: Deploy to server via SSH ☁️ - name: Deploy to server via SSH ☁️
uses: appleboy/ssh-action@v1.0.3 uses: appleboy/ssh-action@v1.0.3
with: with:
host: ${{ secrets.SERVER_HOST }} host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }} username: ${{ secrets.SERVER_USERNAME }}
key_path: ~/.ssh/id_rsa key: ${{ secrets.SSH_PRIVATE_KEY }}
debug: true debug: true
script: | script: |
cd /var/www/codered-astra cd /var/www/codered-astra