From 336f5f33ac28526ee454a08d25162a1df0388100 Mon Sep 17 00:00:00 2001 From: bytedream Date: Thu, 10 Aug 2023 14:57:09 +0200 Subject: [PATCH] use other deploy action --- .gitea/workflows/deploy.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 59f2990..6ff5840 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -17,19 +17,18 @@ jobs: run: npm run build - name: Deploy - uses: cross-the-world/ssh-scp-ssh-pipelines@master + uses: alinz/ssh-scp-action@master with: host: 10.20.6.7 port: 22 user: root key: ${{ secrets.SSH_KEY }} - first_ssh: | - rm -r /root/website - mkdir /root/website + ssh_before: | + rm -r /opt/website + mkdir /opt/website scp: | - './build/*' => /root/website - './package*' => /root/website - last_ssh: | - cd /root/website + $(ls -d -1 build/*) $(ls package*) root@10.20.6.7:/opt/website + ssh_after: | + cd /opt/website npm i --omit=dev - nohup node index.js > /var/log/website 2>&1 + systemctl restart website