From e85df705dfabe7849d5146864ecd2e7c9ca96a58 Mon Sep 17 00:00:00 2001 From: Sam Tate Date: Sat, 29 Jun 2024 14:06:54 +0100 Subject: [PATCH] changing gitea action to maybe fix corrupted images --- .gitea/workflows/hugo-deploy.yaml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/hugo-deploy.yaml b/.gitea/workflows/hugo-deploy.yaml index e03247a..5a989ac 100644 --- a/.gitea/workflows/hugo-deploy.yaml +++ b/.gitea/workflows/hugo-deploy.yaml @@ -22,13 +22,14 @@ jobs: - name: Build run: hugo --minify - - name: Deploy to Staging server - uses: easingthemes/ssh-deploy@main + - name: Install SSH Key + uses: shimataro/ssh-key-action@v2 with: - SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} - ARGS: "-rlgoDzvc -i" - SOURCE: "public/" - REMOTE_HOST: ${{ secrets.REMOTE_HOST }} - REMOTE_USER: ${{ secrets.REMOTE_USER }} - TARGET: ${{ secrets.REMOTE_TARGET }} - EXCLUDE: "/dist/, /node_modules/" \ No newline at end of file + key: ${{ secrets.SSH_PRIVATE_KEY }} + known_hosts: 'placeholder' # to make it work + + - name: Adding Known Hosts + run: ssh-keyscan -H ${{ secrets.REMOTE_HOST }} >> ~/.ssh/known_hosts + + - name: Deploy with rsync + run: rsync -avz --delete ./public/ ${{ secrets.REMOTE_USER }}@${{ secrets.REMOTE_HOST }}:${{ secrets.REMOTE_TARGET }} \ No newline at end of file