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

View File

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