Skip to content

Merge pull request #498 from Esmat-Farjad/feat/fixing_issues #408

Merge pull request #498 from Esmat-Farjad/feat/fixing_issues

Merge pull request #498 from Esmat-Farjad/feat/fixing_issues #408

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
cd rh/
source .venv/bin/activate
python3 --version
poetry --version
node -v
npm -v
git stash
git pull origin main
git stash pop
poetry install --without dev
make clear_cache
make migrate
make npm-install
make collectstatic
make npm-build
sudo systemctl restart nginx
sudo systemctl restart gunicorn.service
"