From 83f508d8af7baf88bf90c1caf99eb3d678d7ca50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=AC=E8=85=BE?= <2393714045@qq.com> Date: Tue, 28 Nov 2023 16:51:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0workflows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deplog.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/deplog.yml diff --git a/.github/workflows/deplog.yml b/.github/workflows/deplog.yml new file mode 100644 index 0000000..915367b --- /dev/null +++ b/.github/workflows/deplog.yml @@ -0,0 +1,28 @@ +name: Server CD +on: + push: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest #指定运行环境为最新的Ubuntu版本 + strategy: + matrix: + node-version: [16.18.0] #指定node版本 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Deploy to Server + uses: cross-the-world/ssh-scp-ssh-pipelines@latest + with: + host: ${{ secrets.LDD_SERVER_IP }} # 服务器的ip + user: ${{ secrets.LDD_SERVER_NAME }} # 服务器的账号 + pass: ${{ secrets.LDD_SERVER_PASSWORD }} # 服务器的密码 + connect_timeout: 60s + scp: | + cd /www/wwwroot/hole-server + git pull + yarn + docker build -t hole-server . + docker run -p 3000:3000 hole-server