- reorder app.sh to run cert before commit/push (fixes workflow failure on first run) - quote $SSH_ORIGINAL_COMMAND in authorized_keys to prevent command injection - add port validation in service.sh nginx command - pin host key in deploy-beszel.yml workflow - fix append vs overwrite for known_hosts in deploy-nginx.yml
This commit is contained in:
@@ -13,6 +13,7 @@ jobs:
|
||||
- name: Deploy via SSH
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "${{ vars.DEPLOY_HOST_KEY }}" > ~/.ssh/known_hosts
|
||||
echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/deploy_key
|
||||
chmod 600 ~/.ssh/deploy_key
|
||||
ssh -o StrictHostKeyChecking=accept-new -i ~/.ssh/deploy_key deploy@${{ vars.DEPLOY_HOST }} deploy-beszel
|
||||
ssh -o StrictHostKeyChecking=yes -i ~/.ssh/deploy_key deploy@${{ vars.DEPLOY_HOST }} deploy-beszel
|
||||
|
||||
@@ -15,8 +15,7 @@ jobs:
|
||||
- name: Deploy via SSH
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "${{ vars.DEPLOY_HOST_KEY }}" >> ~/.ssh/known_hosts
|
||||
chmod 644 ~/.ssh/known_hosts
|
||||
echo "${{ vars.DEPLOY_HOST_KEY }}" > ~/.ssh/known_hosts
|
||||
echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/deploy_key
|
||||
chmod 600 ~/.ssh/deploy_key
|
||||
ssh -o StrictHostKeyChecking=yes -i ~/.ssh/deploy_key deploy@${{ vars.DEPLOY_HOST }} deploy-nginx
|
||||
|
||||
Reference in New Issue
Block a user