ci: use rsync/ssh
Build and Deploy / Build and Upload (push) Successful in 1m24s
Build and Deploy / Upload (push) Successful in 11s

This commit is contained in:
redglow
2026-06-23 15:03:33 +02:00
parent 31dc117fb9
commit b843f49399
+8 -7
View File
@@ -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 }}