From 898f189c6769bef31b7d971b35cfed39b90128b9 Mon Sep 17 00:00:00 2001 From: "yaoyuan2.chu" Date: Mon, 26 Apr 2021 00:20:37 +0800 Subject: [PATCH] chuyaoyuan MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 提交 --- .git-ftp-include | 1 + .github/workflows/nodejs.yml | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 .git-ftp-include create mode 100644 .github/workflows/nodejs.yml diff --git a/.git-ftp-include b/.git-ftp-include new file mode 100644 index 0000000..c310678 --- /dev/null +++ b/.git-ftp-include @@ -0,0 +1 @@ +!build/ \ No newline at end of file diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml new file mode 100644 index 0000000..da1f200 --- /dev/null +++ b/.github/workflows/nodejs.yml @@ -0,0 +1,29 @@ +name: Node.js CI + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm install + - run: npm run build --if-present + - name: FTP Deploy + uses: SamKirkland/FTP-Deploy-Action@3.0.0 + with: + ftp-server: 你的虚拟主机 FTP 上传地址/ftp 目录 + ftp-username: ${{ secrets.ftp_user }} + ftp-password: ${{ secrets.ftp_pwd }} + local-dir: build/ + env: + CI: true \ No newline at end of file