Skip to content

Merge pull request #513 from iMMAP/fix/slow_query_for_TL_count_and_fo… #423

Merge pull request #513 from iMMAP/fix/slow_query_for_TL_count_and_fo…

Merge pull request #513 from iMMAP/fix/slow_query_for_TL_count_and_fo… #423

Workflow file for this run

name: Continuous Integration
on:
push:
branches:
- main
concurrency:
group: main
cancel-in-progress: true
jobs:
quality-assurance:
name: Quality Assurance
uses: ./.github/workflows/quality_assurance.yml
deploy:
name: Deploy
needs: quality-assurance
runs-on: ubuntu-latest
steps:
- name: Configure SSH
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_USER: ${{ secrets.SSH_USER }}
run: |
mkdir -p ~/.ssh/
echo "$SSH_PRIVATE_KEY" > ~/.ssh/github
chmod 600 ~/.ssh/github
cat >>~/.ssh/config <<END
Host target
HostName $SSH_HOST
User $SSH_USER
IdentityFile ~/.ssh/github
LogLevel ERROR
StrictHostKeyChecking no
END
- name: Run deploy
run: |
ssh target "
python3 --version || exit 1
cd rh/ || exit 1
source .venv/bin/activate || exit 1
python3 --version || exit 1
poetry --version || exit 1
node -v || exit 1
npm -v || exit 1
git stash || exit 1
git pull origin main || exit 1
git stash pop || exit 1
poetry install --without dev || exit 1
make clear_cache || exit 1
make migrate || exit 1
make npm-install || exit 1
make collectstatic || exit 1
make npm-build || exit 1
sudo systemctl restart nginx || exit 1
sudo systemctl restart gunicorn.service || exit 1
"