refactor: remove unique constraint from finance category name #132
This file contains hidden or 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: Deploy to AWS EC2 | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: SSH into EC2 & Deploy | |
| uses: appleboy/[email protected] | |
| with: | |
| host: ${{ secrets.EC2_IP }} | |
| username: ubuntu | |
| key: ${{ secrets.EC2_SSH_KEY }} | |
| script: | | |
| cd /home/ubuntu/depoc | |
| git pull origin main | |
| cd backend | |
| # Compare local Pipfile.lock with the one in the repo | |
| git diff --quiet Pipfile.lock || { | |
| echo "Pipfile.lock has changed, installing dependencies."; | |
| pipenv install --deploy --ignore-pipfile | |
| echo "pipenv install completed." | |
| } | |
| pipenv run python manage.py migrate | |
| sudo systemctl restart gunicorn.service | |
| sudo systemctl restart nginx |