From 01b4b23fc9e2a0a2de453046b0c23ffac5274c7b Mon Sep 17 00:00:00 2001 From: Pieter De Clercq Date: Sat, 24 Oct 2020 16:48:46 +0200 Subject: [PATCH] Add deployment workflow --- .editorconfig | 6 ++++++ .github/workflows/deploy.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .editorconfig create mode 100644 .github/workflows/deploy.yml diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..9de9928 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,6 @@ +root = true + +[{*.yml, *.yaml}] +indent_size = 2 +indent_style = space +max_line_length=80 \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..562baa1 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,28 @@ +name: Deploy + +on: + push: + branches: + - master + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Deploy to server + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.DEPLOY_HOST }} + port: ${{ secrets.DEPLOY_PORT }} + key: ${{ secrets.DEPLOY_PRIVATE_KEY }} + script: "cd didier; git pull" + username: pi + - name: Restart Didier + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.DEPLOY_HOST }} + port: ${{ secrets.DEPLOY_PORT }} + key: ${{ secrets.DEPLOY_PRIVATE_KEY }} + script: "sudo service didier restart" + username: pi \ No newline at end of file