diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8bc0cbdd..91e2203f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,21 +1,29 @@ name: Deploy to production on: - workflow_run: - workflows: [Unit Testing] - types: [completed] - branches: - - master + push: + branches: [ actions ] + workflow_dispatch: jobs: - on-success: + deploy: runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' }} + steps: - - run: echo 'The triggering workflow passed' + - name: SSH Remote Commands + uses: appleboy/ssh-action@v0.1.5 + with: + # Proxy + proxy_host : ${{secrets.PROXY_HOST}} + proxy_port : ${{secrets.PROXY_PORT}} + proxy_username : ${{secrets.PROXY_USERNAME}} + proxy_passphrase: ${{secrets.PROXY_PASSPHRASE}} + proxy_key: ${{secrets.PROXY_KEY}} + + # Serveur web + host: ${{secrets.HOST}} + port : ${{secrets.PORT}} + username : ${{secrets.USERNAME}} + key: ${{secrets.KEY}} - on-failure: - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'failure' }} - steps: - - run: echo 'The triggering workflow failed' \ No newline at end of file + script: whoami \ No newline at end of file diff --git a/.github/workflows/unittests.bak b/.github/workflows/unittests.bak index 733fe07b..98c57daf 100644 --- a/.github/workflows/unittests.bak +++ b/.github/workflows/unittests.bak @@ -1,6 +1,11 @@ name: Unit Testing -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + jobs: unittests: runs-on: ubuntu-latest diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 8b5964d1..f1a6aa13 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -1,6 +1,11 @@ name: Unit Testing -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + jobs: unittests: runs-on: ubuntu-latest