Skip to content

armgit / mwmbl

Public Imported from GitHub
0

An open source, non-profit web search engine

Use a more reliable SSH technique

Daoud Clarkec1c8138a253e
diff --git a/.github/workflows/deploy-beta.yml b/.github/workflows/deploy-beta.yml
index 53c0989..f21cd55 100644
--- a/.github/workflows/deploy-beta.yml
+++ b/.github/workflows/deploy-beta.yml
@@ -11,12 +11,18 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- - name: Remote SSH Deploy
- uses: appleboy/ssh-action@master
+ - name: Set up SSH Agent
+ uses: webfactory/[email protected]
with:
- host: mwmbl.org
- username: root # or your dokku user
- key: ${{ secrets.SSH_PRIVATE_KEY }}
- script: |
- # Pull whatever tag you specified in the button click
- dokku git:from-image beta.mwmbl.org ghcr.io/${{ github.repository }}:${{ github.event.inputs.tag }}
+ ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
+
+ - name: Add Host to Known Hosts
+ run: |
+ mkdir -p ~/.ssh
+ ssh-keyscan -H your-server-ip-or-domain >> ~/.ssh/known_hosts
+
+ - name: Deploy Beta via SSH
+ run: |
+ # Use the standard ssh command.
+ # The agent will automatically provide the key.
+ ssh [email protected] "dokku git:from-image beta.mwmbl.org ghcr.io/${{ github.repository }}:${{ github.event.inputs.tag }}"