File tree Expand file tree Collapse file tree 3 files changed +30
-1
lines changed
Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy to EC2
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ deploy :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Deploy via SSH
14+ uses : appleboy/ssh-action@v1.0.3
15+ with :
16+ host : 43.205.143.123
17+ username : ubuntu
18+ key : ${{ secrets.EC2_SSH_KEY }}
19+ script : |
20+ cd /var/www/softwareProject
21+ git pull origin main
22+ cd backend
23+ npm install --omit=dev
24+ pm2 restart backend
Original file line number Diff line number Diff line change @@ -48,6 +48,10 @@ coverage/
4848# Environment variables (CONTAINS SENSITIVE DATA - MONGODB URI, JWT SECRET, AWS KEYS)
4949.env
5050.env. * .local
51+
52+ # SSH keys - NEVER commit these
53+ * .pem
54+ * .key
5155.env.local
5256.env.test
5357
Original file line number Diff line number Diff line change @@ -24,4 +24,5 @@ dist-ssr
2424* .sw ?
2525
2626
27- COST_REDUCTION_TIPS.md
27+ COST_REDUCTION_TIPS.md
28+ * .pem
You can’t perform that action at this time.
0 commit comments