From 97a87eeeaa290edf170f47f53c094a1448924058 Mon Sep 17 00:00:00 2001 From: "Jason.z" <281674669@qq.com> Date: Fri, 5 Jan 2024 23:33:51 +0800 Subject: [PATCH] add workflow --- .github/workflows/deploy.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..0a7548b --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,36 @@ +name: Build app and deploy to aliyun +on: + push: + branches: + - main +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + - name: npm install + run: npm install + # 运行构建脚本 + - name: Build VuePress site + run: npm docs:build + # 部署到阿里云 + - name: Deploy to Aliyun + uses: easingthemes/ssh-deploy@v2.1.1 + env: + # 私钥 + SSH_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} + # scp参数 + ARGS: "-avzr --delete" + # 源目录,编译后生成的文件目录 + SOURCE: "./dist" + # 服务器ip:换成你的服务器IP + REMOTE_HOST: "121.43.54.148" + # 用户 + REMOTE_USER: "root" + # 目标地址 你在服务器上部署代码的地方 + TARGET: "/www/byteee-fund-docs/cordova-plugin-wechat"