File tree Expand file tree Collapse file tree 2 files changed +37
-2
lines changed
Expand file tree Collapse file tree 2 files changed +37
-2
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy to EC2
2+
3+ on :
4+ push :
5+ branches : ["main"]
6+
7+ jobs :
8+ deploy :
9+ runs-on : ubuntu-latest
10+
11+ steps :
12+ - name : Checkout code
13+ uses : actions/checkout@v3
14+
15+ - name : Copy files to EC2
16+ uses : appleboy/scp-action@v0.1.4
17+ with :
18+ host : ${{ secrets.EC2_HOST }}
19+ username : ${{ secrets.EC2_USER }}
20+ key : ${{ secrets.EC2_SSH_KEY }}
21+ source : " ."
22+ target : " ~/pradan_forms_processing_system_backend"
23+
24+ - name : SSH into EC2 and restart app
25+ uses : appleboy/ssh-action@v0.1.10
26+ with :
27+ host : ${{ secrets.EC2_HOST }}
28+ username : ${{ secrets.EC2_USER }}
29+ key : ${{ secrets.EC2_SSH_KEY }}
30+ script : |
31+ cd ~/pradan_forms_processing_system_backend
32+ npm install --production
33+ pm2 restart myapp || pm2 start index.js --name "Pradan-app-backend"
34+ pm2 save
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ const getbasicdetails_sql = `SELECT
4747 forms.age,
4848 forms.mobile,
4949 forms.district,
50+ forms.status,
5051 forms.block,
5152 forms.panchayat,
5253 forms.hamlet,
@@ -184,8 +185,8 @@ const getbasicdetails_sql = `SELECT
184185exports . getpreviewspecificformData = asyncHandler ( async ( req , res ) => {
185186 const id = req . query . form_id ;
186187 const form_type = req . query . form_type ;
187- //console.log("Form ID",id);
188- //console.log("Form type",typeof(form_type));
188+ // console.log("Form ID",id);
189+ // console.log("Form type",typeof(form_type));
189190 const connection = await db . getConnection ( ) ;
190191
191192 try {
You can’t perform that action at this time.
0 commit comments