From d119b3bb21d374aac6b9d3e177b8f339d8305010 Mon Sep 17 00:00:00 2001 From: hkri Date: Sun, 25 Jul 2021 22:38:54 +0800 Subject: [PATCH] Add GitHub Action deploy. --- .github/workflows/deploy.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 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..a694a7e --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,23 @@ +name: Deploy +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: SCP Files + uses: appleboy/scp-action@master + with: + host: ${{ secrets.DROPLET_IP }} + username: ${{ secrets.DROPLET_USER }} + key: ${{ secrets.DROPLET_KEY }} + source: "dist/*" + target: ${{ secrets.DEPLOY_PATH }} + strip_components: 1 + rm: true \ No newline at end of file