34 lines
688 B
YAML
34 lines
688 B
YAML
name: Deploy Company Site
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python environment
|
|
run: |
|
|
python3 -m venv .venv
|
|
.venv/bin/pip install --upgrade pip
|
|
.venv/bin/pip install -r requirements.txt
|
|
|
|
- name: Run unit tests
|
|
run: |
|
|
cd company_site
|
|
../.venv/bin/python manage.py test
|
|
|
|
deploy:
|
|
needs: test
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Deploy to live site
|
|
run: bash scripts/deploy.sh "${{ gitea.workspace }}"
|