Skip to content

Commit

Permalink
Merge pull request #63 from rpl-auto-a/Iqbal
Browse files Browse the repository at this point in the history
feat: add workflows
  • Loading branch information
iqbaldwitama authored Dec 4, 2023
2 parents 94a2697 + 3f1b52f commit 0036a64
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Deploy

on:
push:
branches:
- main
- master

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 incremental-service
source env/bin/activate
pip3 install -r requirements.txt
python3 manage.py migrate
git pull origin main

0 comments on commit 0036a64

Please sign in to comment.