Added some safety to deploy script

This commit is contained in:
Théo DURR 2022-08-26 16:39:49 +02:00
parent b3ad5c5df9
commit 863f9ff77e
No known key found for this signature in database
GPG Key ID: 708858E9F7281E30
2 changed files with 8 additions and 1 deletions

View File

@ -4,11 +4,16 @@ concurrency: production
on:
push:
branches: [master]
workflow_run:
workflows: [Sith3 CI]
types: [completed]
workflow_dispatch:
jobs:
# Runs only if Unit tests are successful
deployment:
runs-on: ubuntu-latest
if: ${{github.event.workflow_run.conclusion == 'success'}}
environment: production
timeout-minutes: 30
@ -29,6 +34,8 @@ jobs:
username : ${{secrets.USER}}
key: ${{secrets.KEY}}
script_stop: true
# See https://github.com/ae-utbm/sith3/wiki/GitHub-Actions#deployment-action
script: |
export PATH="$HOME/.poetry/bin:$PATH"

View File

@ -1,4 +1,4 @@
name: Unit Testing
name: Sith3 CI
on:
pull_request: