mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-26 02:54:20 +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
|
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'
|
|
7
.github/workflows/unittests.bak
vendored
7
.github/workflows/unittests.bak
vendored
@ -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
|
||||||
|
7
.github/workflows/unittests.yml
vendored
7
.github/workflows/unittests.yml
vendored
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user