From d740403f272b9559500af1e58a5ce3e0f0601b86 Mon Sep 17 00:00:00 2001 From: hkri Date: Sun, 18 Jul 2021 02:54:17 +0800 Subject: [PATCH] Add GH Action deployment. --- .github/workflows/build.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..a1c473d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,25 @@ +name: Deploy +on: + # triggers the workflow only for the master branch + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + # checks-out repository under $GITHUB_WORKSPACE + - 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