Skip to content

financial overview design #40

financial overview design

financial overview design #40

Workflow file for this run

name: Deploy project

Check failure on line 1 in .github/workflows/deploy.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/deploy.yml

Invalid workflow file

`on.workflow_run` does not reference any workflows. See https://docs.github.com/actions/learn-github-actions/events-that-trigger-workflows#workflow_run for more information
on:
workflow_run:
workflows: []
types:
- completed
jobs:
deploy:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install SSH key
uses: webfactory/ssh-agent@v0.5.3
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Deploy to server
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.DEPLOY_USER }}@${{ secrets.IP_ADDRESS }} "cd ~/Virtual-Bank && git pull origin main" || exit 1
- name: Collect API static
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.DEPLOY_USER }}@${{ secrets.IP_ADDRESS }} "cd ~/Virtual-Bank/api && python3 manage.py collectstatic --noinput" || exit 1
- name: Collect clients static
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.DEPLOY_USER }}@${{ secrets.IP_ADDRESS }} "cd ~/Virtual-Bank/clients && python3 manage.py collectstatic --noinput" || exit 1
- name: Restart and reload
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.DEPLOY_USER }}@${{ secrets.IP_ADDRESS }} "sudo service nginx restart && pkill -HUP -f gunicorn" || exit 1