Skip to content

fix: Resolve error in project detail view with anonymous user. #21

fix: Resolve error in project detail view with anonymous user.

fix: Resolve error in project detail view with anonymous user. #21

Workflow file for this run

name: Continuous Integration
on:
push:
branches:
- main
concurrency:
group: main
cancel-in-progress: true
jobs:
qa:
name: Quality Assurance
uses: ./.github/workflows/qa.yml
deploy:
name: Deploy
needs: qa
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 "cd /usr/projects/services-exchange && docker compose down && docker system prune -f -a --volumes && git pull && rm -rf ./staticfiles && docker compose up -d --build --force-recreate && docker exec web python manage.py collectstatic --noinput && docker compose down && docker compose up -d"