diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..6814348 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,23 @@ +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Run and deploy + uses: appleboy/ssh-action@v0.1.9 + with: + host: ${{ secrets.SERVER_HOST }} + username: ${{ secrets.SERVER_USERNAME }} + password: ${{ secrets.SERVER_PASSWORD }} + port: ${{ secrets.SERVER_PORT }} + script: | + cd ${{ secrets.SERVER_PATH }} + git fetch --all + git pull