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