fix: remove error about negint regex #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Production deploy | |
on: | |
push: | |
tags: | |
- v** | |
jobs: | |
deploy: | |
name: Deploy to production server | |
runs-on: [self-hosted, sport] | |
environment: | |
name: production | |
url: https://sport.innopolis.university | |
steps: | |
- name: Deploy via SSH | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
password: ${{ secrets.PASSWORD }} | |
port: ${{ secrets.PORT }} | |
script: | | |
cd ${{ secrets.REPOSITORY_PATH }}/deploy | |
git reset --hard | |
git fetch | |
git checkout ${{ github.ref_name }} | |
git pull | |
python3 ${{ secrets.BACKUP_SCRIPT }} | |
docker compose -f docker-compose.prod.yaml pull | |
docker compose -f docker-compose.prod.yaml build --pull | |
docker compose -f docker-compose.prod.yaml down | |
docker compose -f docker-compose.prod.yaml up -d | |
docker compose -f docker-compose.prod.yaml exec -T adminpanel bash -c "while !</dev/tcp/db/5432; do sleep 1; done;" | |
docker compose -f docker-compose.prod.yaml exec -T adminpanel bash -c 'python3 manage.py collectstatic --noinput && python3 manage.py migrate && python3 manage.py createcachetable' | |
python3 ${{ secrets.BACKUP_SCRIPT }} |