ci: use rsync/ssh
This commit is contained in:
@@ -21,9 +21,6 @@ jobs:
|
|||||||
- name: Vite build
|
- name: Vite build
|
||||||
shell: bash
|
shell: bash
|
||||||
run: ./node_modules/.bin/vite build
|
run: ./node_modules/.bin/vite build
|
||||||
- name: Yarn install (prod)
|
|
||||||
shell: bash
|
|
||||||
run: rm -rf node_modules && yarn install --production=true
|
|
||||||
- name: Publish artifacts
|
- name: Publish artifacts
|
||||||
uses: https://gitea.com/actions/gitea-upload-artifact@v4
|
uses: https://gitea.com/actions/gitea-upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
@@ -31,7 +28,6 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
dist
|
dist
|
||||||
index.html
|
index.html
|
||||||
node_modules
|
|
||||||
package.json
|
package.json
|
||||||
public
|
public
|
||||||
src
|
src
|
||||||
@@ -45,7 +41,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: artifact
|
name: artifact
|
||||||
path: 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: |
|
run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
chmod 600 ~/.ssh
|
chmod 600 ~/.ssh
|
||||||
@@ -53,8 +53,9 @@ jobs:
|
|||||||
chmod 600 ~/.ssh/known_hosts
|
chmod 600 ~/.ssh/known_hosts
|
||||||
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
|
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
|
||||||
chmod 600 ~/.ssh/id_ed25519
|
chmod 600 ~/.ssh/id_ed25519
|
||||||
scp -r -P 44 artifact owofannouncements@foxthesystem.space:~/server
|
# scp -r -P 44 artifact owofannouncements@foxthesystem.space:~/server
|
||||||
# rsync -avzxh --delete -e 'ssh -p 44 -2' 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:
|
env:
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
SSH_KEYSCAN: ${{ secrets.SSH_KEYSCAN }}
|
SSH_KEYSCAN: ${{ secrets.SSH_KEYSCAN }}
|
||||||
Reference in New Issue
Block a user