Change key and add Secrets
Deploy Website per SSH / index.html auf Webserver deployen (push) Failing after 6s
Deploy Website per SSH / index.html auf Webserver deployen (push) Failing after 6s
This commit is contained in:
@@ -25,8 +25,8 @@ jobs:
|
||||
- name: 🔑 SSH-Key vorbereiten
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
||||
chmod 600 ~/.ssh/id_rsa
|
||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25516
|
||||
chmod 600 ~/.ssh/id_ed25516
|
||||
ssh-keyscan -H -p ${{ secrets.SSH_PORT }} ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
|
||||
|
||||
# ─────────────────────────────────────────────
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
- name: 🔌 SSH-Verbindung testen
|
||||
run: |
|
||||
ssh -p ${{ secrets.SSH_PORT }} \
|
||||
-i ~/.ssh/id_rsa \
|
||||
-i ~/.ssh/id_ed25516 \
|
||||
${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} \
|
||||
"echo '✅ SSH-Verbindung erfolgreich' && hostname && date"
|
||||
|
||||
@@ -45,7 +45,7 @@ jobs:
|
||||
- name: 📤 index.html auf Server kopieren
|
||||
run: |
|
||||
scp -P ${{ secrets.SSH_PORT }} \
|
||||
-i ~/.ssh/id_rsa \
|
||||
-i ~/.ssh/id_ed25516 \
|
||||
./index.html \
|
||||
${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.DEPLOY_PATH }}/index.html
|
||||
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
- name: 🔧 Dateirechte anpassen
|
||||
run: |
|
||||
ssh -p ${{ secrets.SSH_PORT }} \
|
||||
-i ~/.ssh/id_rsa \
|
||||
-i ~/.ssh/id_ed25516 \
|
||||
${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} \
|
||||
"chmod 644 ${{ secrets.DEPLOY_PATH }}/index.html && ls -lah ${{ secrets.DEPLOY_PATH }}/"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user