Skip to content

Commit 64512d9

Browse files
committed
updated
1 parent a2f3210 commit 64512d9

File tree

2 files changed

+32
-32
lines changed

2 files changed

+32
-32
lines changed

.github/workflows/deploy.disable

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Deploy to server
2+
3+
on:
4+
push:
5+
branches:
6+
- master # Trigger the workflow on push or pull request to the master branch
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Execute remote ssh commands to deploy
17+
uses: appleboy/ssh-action@master
18+
with:
19+
host: ${{ secrets.SERVER_HOST }}
20+
username: ${{ secrets.SERVER_USERNAME }}
21+
key: ${{ secrets.SSH_KEY }}
22+
script: |
23+
cd LinkedinAI
24+
git reset --hard
25+
git pull
26+
sed -i "s/SECRET_KEY = .*/SECRET_KEY = '${{ secrets.SECRET_KEY }}'/g" LinkedInAi/settings.py
27+
sed -i "s/DEBUG = .*/DEBUG = False/g" LinkedInAi/settings.py
28+
sed -i "s/ALLOWED_HOSTS = .*/ALLOWED_HOSTS = ['linkedinai.pratikpathak.com']/g" LinkedInAi/settings.py
29+
.venv/bin/python manage.py makemigrations # create new migrations based on the changes you made to your models
30+
.venv/bin/python manage.py migrate # apply and unapply migrations
31+
.venv/bin/python manage.py collectstatic --noinput
32+
sudo systemctl restart django

.github/workflows/deploy.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)