diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..e466d4f --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,19 @@ +name: Deploy +on: + workflow_run: + workflows: [ 'Pull' ] + types: [ completed ] + branches: + - main +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Update and restart docker containers with ssh + uses: appleboy/ssh-action@v1.0.3 + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USERNAME }} + password: ${{ secrets.SSH_PASSWORD }} + port: ${{ secrets.SSH_PORT }} + script: make -C ${{ vars.PROJECT_DIR }} update \ No newline at end of file diff --git a/.github/workflows/pull.yaml b/.github/workflows/pull.yaml index ff1c4aa..0982ea8 100644 --- a/.github/workflows/pull.yaml +++ b/.github/workflows/pull.yaml @@ -1,4 +1,4 @@ -name: Pull the git repository on the server +name: Pull on: push: branches: