From ac9a1f65e6719b1aa32ca5105c99efa779660567 Mon Sep 17 00:00:00 2001 From: shockrah Date: Wed, 11 Sep 2024 21:35:12 -0700 Subject: [PATCH] single step scp in action --- .gitea/workflows/build-and-deploy.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/build-and-deploy.yml b/.gitea/workflows/build-and-deploy.yml index 76e07c0..ee7d817 100644 --- a/.gitea/workflows/build-and-deploy.yml +++ b/.gitea/workflows/build-and-deploy.yml @@ -19,9 +19,12 @@ jobs: run: hugo - name: Setup the hostname with the private key that we have run: mkdir -p ~/.ssh/ && ssh-keyscan git.shockrah.xyz >> ~/.ssh/known_hosts - - name: Setup SSH to copy files up to remote webserver - uses: webfactory/ssh-agent@v0.9.0 + - name: SCP Files with marketplace action + uses: appleboy/scp-action@v0.1.7 with: - ssh-private-key: ${{ secrets.PRIVATE_KEY }} - - name: SCP Files to resume web server - run: "scp -o UserKnownHostsFile=/dev/null -r public/ $ssh_target:$remote_path" + host: ${{ secrets.HOST }} + username: ${{ secrets.USER }} + port: ${{ secrets.PORT }} + key: ${{ secrets.PRIVATE_KEY }} + source: public/ + target: /opt/nginx/test.shockrah.xyz