From 07a4fe289eb3e176fec3cede79f41288ecb892c0 Mon Sep 17 00:00:00 2001 From: CJSatnarine Date: Sat, 13 Sep 2025 21:36:25 -0400 Subject: [PATCH] erm, here goes nothing... --- .gitea/workflows/deploy.yml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index c43e70e..7b2989a 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -18,8 +18,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v5 - with: github-server-url: 'https://git.cjsatnarine.space' + uses: actions/checkout@v4 - name: Install Zola run: | @@ -29,11 +28,21 @@ jobs: - name: Build run: ./zola build - - name: Deploy + - name: Write SSH Keys run: | - apt update -y && apt-get install -y --no-install-recommends rsync - eval "$(ssh-agent -s)" - ssh-add - <<< "${SSH_PRIVATE_KEY}" - mkdir -p ~/.ssh/ - ssh-keyscan -H ${HOST} >> ~/.ssh/known_hosts - rsync -r --delete-after public/* "${SSH_USERNAME}@${HOST}:${HOST_DIR}" + install -m 600 -D /dev/null ~/.ssh/id_ed25519 + echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 + ssh-keyscan -H 192.168.0.21 > ~/.ssh/known_hosts + + - name: Copy built site to server + run: ssh cj@192.168.0.21 "rm -rf /var/www/cjsatnarine.space && mkdir /var/www/cjsatnarine.space" + scp -sr public/. cj@192.168.0.21:/var/www/cjsatnarine.space + +# - name: Deploy +# run: | +# apt update -y && apt-get install -y --no-install-recommends rsync +# eval "$(ssh-agent -s)" +# ssh-add - <<< "${SSH_PRIVATE_KEY}" +# mkdir -p ~/.ssh/ +# ssh-keyscan -H ${HOST} >> ~/.ssh/known_hosts +# rsync -r --delete-after public/* "${SSH_USERNAME}@${HOST}:${HOST_DIR}"