We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 249bc1b + b9ca46a commit c45b535Copy full SHA for c45b535
1 file changed
.github/workflows/Deployment-Prod.yml
@@ -0,0 +1,41 @@
1
+name: Millionaire-BE-CI/CD
2
+
3
+on:
4
+ push:
5
+ branches:
6
+ - prod
7
8
+jobs:
9
+ build:
10
+ runs-on: ubuntu-latest
11
12
+ steps:
13
+ - name: Checkout repository
14
+ uses: actions/checkout@v3
15
16
+ - name: Set up Node.js
17
+ uses: actions/setup-node@v3
18
+ with:
19
+ node-version: '20'
20
21
+ - name: Install dependencies
22
+ run: sudo npm install
23
24
+ deploy:
25
26
+ needs: build
27
+ if: github.ref == 'refs/heads/Prod'
28
29
30
+ - name: Deploy to AWS Ubuntu
31
+ uses: appleboy/ssh-action@v0.1.10
32
33
+ host: ${{ secrets.AWS_HOST }}
34
+ username: ubuntu
35
+ key: ${{ secrets.AWS_PRIVATE_KEY }}
36
+ script: |
37
+ cd /home/ubuntu/Millionaire
38
+ git pull origin prod
39
+ sudo npm install
40
+ sudo npm run build
41
+ sudo systemctl reload nginx
0 commit comments