From d53438675a43286926d55afae2ca91935adc2903 Mon Sep 17 00:00:00 2001 From: FoxtrotSierra6829 Date: Sun, 29 Jan 2023 16:49:36 +0200 Subject: [PATCH] ci: sync server via ssh --- .github/master.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/master.yml diff --git a/.github/master.yml b/.github/master.yml new file mode 100644 index 0000000..0bf9711 --- /dev/null +++ b/.github/master.yml @@ -0,0 +1,22 @@ +name: Sync server via SSH +on: + push: + branches: [master] + +jobs: + build: + # Prevent running this on forks + if: github.repository_owner == 'FoxtrotSierra6829' + runs-on: ubuntu-18.04 + steps: + - name: executing remote ssh commands using ssh key + uses: appleboy/ssh-action@v0.1.6 + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USER }} + key: ${{ secrets.SSH_KEY }} + port: ${{ secrets.SSH_PORT }} + script: | + cd PairDrop + git pull + sudo docker compose up -d \ No newline at end of file