Skip to content

Commit 3789cf2

Browse files
committed
sh script to deploy stuff in gcp
1 parent efa1a34 commit 3789cf2

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

.github/scripts/deploy_deepgit.sh

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,22 @@
1-
echo Hello World
2-
ls -l
1+
#!/bin/bash
2+
# This should be run inside GCP compute engine
3+
4+
# pull deploy branch
5+
cd ~/projects/deepgit
6+
git pull origin deploy
7+
8+
# build and deploy the frontend
9+
npm install
10+
rm -rf
11+
npm run build
12+
sudo rm -rf /var/www/deepgit-app/*
13+
sudo cp -rf ~/projects/deepgit
14+
15+
# build and deploy the backend
16+
source .venv/bin/activate
17+
cd backend
18+
pip install -r requirements.txt
19+
20+
# restart nginx and gunicorn
21+
sudo systemctl restart nginx
22+
sudo systemctl restart gunicorn

0 commit comments

Comments
 (0)