mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-21 13:43:20 +00:00
refactor CI
This commit is contained in:
parent
2dd434d987
commit
c7a8a1a91c
10
.github/actions/setup_project/action.yml
vendored
10
.github/actions/setup_project/action.yml
vendored
@ -6,15 +6,9 @@ runs:
|
|||||||
- name: Install apt packages
|
- name: Install apt packages
|
||||||
uses: awalsh128/cache-apt-pkgs-action@latest
|
uses: awalsh128/cache-apt-pkgs-action@latest
|
||||||
with:
|
with:
|
||||||
packages: gettext
|
packages: gettext pipx
|
||||||
version: 1.0 # increment to reset cache
|
version: 1.0 # increment to reset cache
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install gettext
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Set up python
|
- name: Set up python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
@ -30,7 +24,7 @@ runs:
|
|||||||
- name: Install Poetry
|
- name: Install Poetry
|
||||||
if: steps.cached-poetry.outputs.cache-hit != 'true'
|
if: steps.cached-poetry.outputs.cache-hit != 'true'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: curl -sSL https://install.python-poetry.org | python3 -
|
run: pipx install poetry
|
||||||
|
|
||||||
- name: Check pyproject.toml syntax
|
- name: Check pyproject.toml syntax
|
||||||
shell: bash
|
shell: bash
|
||||||
|
7
.github/workflows/deploy.yml
vendored
7
.github/workflows/deploy.yml
vendored
@ -14,7 +14,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: SSH Remote Commands
|
- name: SSH Remote Commands
|
||||||
uses: appleboy/ssh-action@dce9d565de8d876c11d93fa4fe677c0285a66d78
|
uses: appleboy/ssh-action@v1.1.0
|
||||||
with:
|
with:
|
||||||
# Proxy
|
# Proxy
|
||||||
proxy_host : ${{secrets.PROXY_HOST}}
|
proxy_host : ${{secrets.PROXY_HOST}}
|
||||||
@ -33,8 +33,7 @@ jobs:
|
|||||||
|
|
||||||
# See https://github.com/ae-utbm/sith/wiki/GitHub-Actions#deployment-action
|
# See https://github.com/ae-utbm/sith/wiki/GitHub-Actions#deployment-action
|
||||||
script: |
|
script: |
|
||||||
export PATH="/home/sith/.local/bin:$PATH"
|
cd ${{secrets.SITH_PATH}}
|
||||||
pushd ${{secrets.SITH_PATH}}
|
|
||||||
|
|
||||||
git fetch
|
git fetch
|
||||||
git reset --hard origin/master
|
git reset --hard origin/master
|
||||||
@ -42,7 +41,7 @@ jobs:
|
|||||||
npm install
|
npm install
|
||||||
poetry run ./manage.py install_xapian
|
poetry run ./manage.py install_xapian
|
||||||
poetry run ./manage.py migrate
|
poetry run ./manage.py migrate
|
||||||
poetry run ./manage.py collectstatic --clear --clear-generated --noinput
|
poetry run ./manage.py collectstatic --clear --noinput
|
||||||
poetry run ./manage.py compilemessages
|
poetry run ./manage.py compilemessages
|
||||||
|
|
||||||
sudo systemctl restart uwsgi
|
sudo systemctl restart uwsgi
|
||||||
|
7
.github/workflows/taiste.yml
vendored
7
.github/workflows/taiste.yml
vendored
@ -13,7 +13,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: SSH Remote Commands
|
- name: SSH Remote Commands
|
||||||
uses: appleboy/ssh-action@dce9d565de8d876c11d93fa4fe677c0285a66d78
|
uses: appleboy/ssh-action@v1.1.0
|
||||||
with:
|
with:
|
||||||
# Proxy
|
# Proxy
|
||||||
proxy_host : ${{secrets.PROXY_HOST}}
|
proxy_host : ${{secrets.PROXY_HOST}}
|
||||||
@ -32,8 +32,7 @@ jobs:
|
|||||||
|
|
||||||
# See https://github.com/ae-utbm/sith/wiki/GitHub-Actions#deployment-action
|
# See https://github.com/ae-utbm/sith/wiki/GitHub-Actions#deployment-action
|
||||||
script: |
|
script: |
|
||||||
export PATH="$HOME/.poetry/bin:$PATH"
|
cd ${{secrets.SITH_PATH}}
|
||||||
pushd ${{secrets.SITH_PATH}}
|
|
||||||
|
|
||||||
git fetch
|
git fetch
|
||||||
git reset --hard origin/taiste
|
git reset --hard origin/taiste
|
||||||
@ -41,7 +40,7 @@ jobs:
|
|||||||
npm install
|
npm install
|
||||||
poetry run ./manage.py install_xapian
|
poetry run ./manage.py install_xapian
|
||||||
poetry run ./manage.py migrate
|
poetry run ./manage.py migrate
|
||||||
poetry run ./manage.py collectstatic --clear --clear-generated --noinput
|
poetry run ./manage.py collectstatic --clear --noinput
|
||||||
poetry run ./manage.py compilemessages
|
poetry run ./manage.py compilemessages
|
||||||
|
|
||||||
sudo systemctl restart uwsgi
|
sudo systemctl restart uwsgi
|
||||||
|
Loading…
Reference in New Issue
Block a user