mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-01 03:48:04 +00:00
Merge pull request #448 from ae-utbm/actions
This commit is contained in:
commit
997fcc9fff
18
.github/workflows/deploy.yml
vendored
18
.github/workflows/deploy.yml
vendored
@ -4,16 +4,11 @@ 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
|
||||||
|
|
||||||
@ -41,7 +36,6 @@ jobs:
|
|||||||
export PATH="$HOME/.poetry/bin:$PATH"
|
export PATH="$HOME/.poetry/bin:$PATH"
|
||||||
pushd ${{secrets.SITH_PATH}}
|
pushd ${{secrets.SITH_PATH}}
|
||||||
|
|
||||||
VERSION_LAST=$(git rev-parse HEAD)
|
|
||||||
git pull
|
git pull
|
||||||
poetry update
|
poetry update
|
||||||
poetry run ./manage.py migrate
|
poetry run ./manage.py migrate
|
||||||
@ -50,3 +44,15 @@ jobs:
|
|||||||
poetry run ./manage.py compilemessages
|
poetry run ./manage.py compilemessages
|
||||||
|
|
||||||
sudo systemctl restart uwsgi
|
sudo systemctl restart uwsgi
|
||||||
|
|
||||||
|
sentry-release:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Create Sentry release
|
||||||
|
uses: getsentry/action-release@v1
|
||||||
|
env:
|
||||||
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||||
|
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
||||||
|
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
||||||
|
SENTRY_URL: ${{ secrets.SENTRY_URL }}
|
||||||
|
with:
|
||||||
|
environment: production
|
||||||
|
2
.github/workflows/unittests.yml
vendored
2
.github/workflows/unittests.yml
vendored
@ -3,6 +3,8 @@ name: Sith3 CI
|
|||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
unittests:
|
unittests:
|
||||||
|
Loading…
Reference in New Issue
Block a user