From 101d5a3cab41f73a9c7aa0e43605925bf9d9943c Mon Sep 17 00:00:00 2001 From: raffazizzi Date: Tue, 9 Jul 2024 21:35:45 -0400 Subject: [PATCH] another ssh attempt --- .github/workflows/publish.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9b83e6f791..f8d1284481 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -32,17 +32,17 @@ jobs: AIRTABLE_MITH_BASE_ID: appMWsw8HKjjokBg2 run: npm run build - - name: Adding Known Hosts - run: ssh-keyscan -H mith.umd.edu >> ~/.ssh/known_hosts - - - name: Install SSH Key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SSH_SECRET_KEY }} - - name: Deploy to server + env: + SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} run: | - rsync -avz --delete --quiet -e "ssh -i ${{ secrets.SSH_SECRET_KEY }} -o StrictHostKeyChecking=no" ./public/ ubuntu@mith.umd.edu:/var/www/mith.umd.edu + mkdir -p ~/.ssh + ssh-keyscan mith.umd.edu >> ~/.ssh/known_hosts + echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + rsync -avz --delete --quiet ./public/ ubuntu@mith.umd.edu:/var/www/mith.umd.edu - name: Clean up - run: rm -rf ./public/ \ No newline at end of file + run: | + rm -rf ./public/ + rm ~/.ssh/id_rsa \ No newline at end of file