From 8fe4437c9d984e84d4afa6d5dbe5c409ba216cce Mon Sep 17 00:00:00 2001 From: neo Date: Sat, 12 Jun 2021 18:58:38 +0800 Subject: [PATCH] chore: add deploy.yml --- .github/workflows/deploy.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 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..2a1f25c --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,30 @@ +name: Deploy +on: + push: + branches: + - master +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Install Node.js + uses: actions/setup-node@v1 + with: + node-version: '10.x' + - name: Install npm dependencies + run: npm install + - name: Build + run: npm run build + - name: Deploy to Server + uses: easingthemes/ssh-deploy@main + env: + SSH_PRIVATE_KEY: ${{ secrets.SERVER_SSH_KEY }} + ARGS: "-rltgoDzvO --delete" + SOURCE: "dist/" + REMOTE_HOST: ${{ secrets.REMOTE_HOST }} + REMOTE_USER: ${{ secrets.REMOTE_USER }} + TARGET: ${{ secrets.REMOTE_TARGET }} + EXCLUDE: "/dist/, /node_modules/"