Added sample deploy action

This commit is contained in:
Théo DURR 2022-08-26 13:20:57 +02:00
parent 273371db8b
commit 6e4a99eba3
No known key found for this signature in database
GPG Key ID: 708858E9F7281E30
3 changed files with 33 additions and 15 deletions

View File

@ -1,21 +1,29 @@
name: Deploy to production name: Deploy to production
on: on:
workflow_run: push:
workflows: [Unit Testing] branches: [ actions ]
types: [completed] workflow_dispatch:
branches:
- master
jobs: jobs:
on-success: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps: 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: script: whoami
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo 'The triggering workflow failed'

View File

@ -1,6 +1,11 @@
name: Unit Testing name: Unit Testing
on: [push] on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs: jobs:
unittests: unittests:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -1,6 +1,11 @@
name: Unit Testing name: Unit Testing
on: [push] on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs: jobs:
unittests: unittests:
runs-on: ubuntu-latest runs-on: ubuntu-latest