Merge pull request #68 from rpl-auto-a/staging #3
This file contains 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 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
Deployment: | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cloning repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Push to server | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.GCP_VM_IP }} | |
username: ${{ secrets.GCP_VM_USERNAME }} | |
key: ${{ secrets.GCP_PRIVATE_KEY }} | |
script: | | |
cd /home/iqbaldwtm | |
cd incremental-service | |
git pull origin main | |
source env/bin/activate | |
pip3 install -r requirements.txt | |
python3 manage.py migrate |