From b843f49399881034df791367dcb9cdde50abfb53 Mon Sep 17 00:00:00 2001 From: redglow Date: Tue, 23 Jun 2026 15:03:33 +0200 Subject: [PATCH] ci: use rsync/ssh --- .gitea/workflows/cicd.yaml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/cicd.yaml b/.gitea/workflows/cicd.yaml index 274c91c..487560c 100644 --- a/.gitea/workflows/cicd.yaml +++ b/.gitea/workflows/cicd.yaml @@ -21,9 +21,6 @@ jobs: - name: Vite build shell: bash run: ./node_modules/.bin/vite build - - name: Yarn install (prod) - shell: bash - run: rm -rf node_modules && yarn install --production=true - name: Publish artifacts uses: https://gitea.com/actions/gitea-upload-artifact@v4 with: @@ -31,7 +28,6 @@ jobs: path: | dist index.html - node_modules package.json public src @@ -45,7 +41,11 @@ jobs: with: name: artifact path: artifact - - name: Upload to server + - name: Install rsync + run: | + apt-get update + apt-get -y install rsync + - name: Upload and install dependencies in server run: | mkdir -p ~/.ssh chmod 600 ~/.ssh @@ -53,8 +53,9 @@ jobs: chmod 600 ~/.ssh/known_hosts echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519 chmod 600 ~/.ssh/id_ed25519 - scp -r -P 44 artifact owofannouncements@foxthesystem.space:~/server - # rsync -avzxh --delete -e 'ssh -p 44 -2' artifact owofannouncements@foxthesystem.space:~/server + # scp -r -P 44 artifact owofannouncements@foxthesystem.space:~/server + rsync -avzxh --delete -e 'ssh -p 44' artifact owofannouncements@foxthesystem.space:~/server + ssh -p 44 owofannouncements@foxthesystem.space "/bin/bash -c 'cd server ; yarn install --production=true'" env: SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} SSH_KEYSCAN: ${{ secrets.SSH_KEYSCAN }} \ No newline at end of file