mirror of
https://github.com/ae-utbm/sith.git
synced 2024-10-31 19:38:04 +00:00
Added sample deploy action
This commit is contained in:
parent
273371db8b
commit
6e4a99eba3
34
.github/workflows/deploy.yml
vendored
34
.github/workflows/deploy.yml
vendored
@ -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'
|
||||
script: whoami
|
7
.github/workflows/unittests.bak
vendored
7
.github/workflows/unittests.bak
vendored
@ -1,6 +1,11 @@
|
||||
name: Unit Testing
|
||||
|
||||
on: [push]
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
unittests:
|
||||
runs-on: ubuntu-latest
|
||||
|
7
.github/workflows/unittests.yml
vendored
7
.github/workflows/unittests.yml
vendored
@ -1,6 +1,11 @@
|
||||
name: Unit Testing
|
||||
|
||||
on: [push]
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
unittests:
|
||||
runs-on: ubuntu-latest
|
||||
|
Loading…
Reference in New Issue
Block a user