Skip to content

Add Nginx configuration and StatusPage component #55

Add Nginx configuration and StatusPage component

Add Nginx configuration and StatusPage component #55

Workflow file for this run

name: Deploy TechEventRadar
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
env:
ALLOW_INSECURE_DEFAULTS: "true"
SECRET_KEY: "ci-test-secret-key-that-is-at-least-32-chars"
ADMIN_USERNAME: "testadmin"
ADMIN_PASSWORD: "testpassword"
DATABASE_URL: "sqlite:///./test.db"
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-dev.txt
- name: Check formatting
run: black --check .
- name: Lint
run: pylint app/ --disable=C0114,C0115,C0116,R0903,W0611 --fail-under=7.0
- name: Run tests
run: pytest -m "not integration" -q
deploy:
needs: test
runs-on: ubuntu-latest
steps:
- name: SSH and Deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.SSH_PORT || '22' }}
script: |
cd /home/${{ secrets.SSH_USERNAME }}/TechEventRadar/
git fetch --all
git checkout main
git pull --rebase origin main
docker compose up -d --build --force-recreate
echo "--- Deploy tamamlandi ---"