Skip to content

Commit f9c7fa5

Browse files
authored
Update integration.yml
1 parent 6450749 commit f9c7fa5

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

.github/workflows/integration.yml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -36,33 +36,33 @@ jobs:
3636
run: npm run test
3737

3838

39-
# deploy:
40-
# runs-on: ubuntu-latest
41-
# needs: build # ensures the deploy job runs after the build job
42-
# steps:
43-
# # Step 1: Checkout code
44-
# - name: Checkout code
45-
# uses: actions/checkout@v2
39+
deploy:
40+
runs-on: ubuntu-latest
41+
needs: build # ensures the deploy job runs after the build job
42+
steps:
43+
# Step 1: Checkout code
44+
- name: Checkout code
45+
uses: actions/checkout@v2
4646

47-
# # Step 2: Set up Node.js (again for deployment environment)
48-
# - name: Set up Node.js
49-
# uses: actions/setup-node@v2
50-
# with:
51-
# node-version: '14'
47+
# Step 2: Set up Node.js (again for deployment environment)
48+
- name: Set up Node.js
49+
uses: actions/setup-node@v2
50+
with:
51+
node-version: '18.x'
5252

53-
# # Step 3: Install dependencies (again in the deployment environment)
54-
# - name: Install dependencies
55-
# run: npm install
53+
# Step 3: Install dependencies (again in the deployment environment)
54+
- name: Install dependencies
55+
run: npm install
5656

57-
# # Step 4: Deploy to the server via SSH
58-
# - name: Deploy to Server
59-
# run: |
60-
# ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SERVER_IP }} << 'EOF'
61-
# cd /path/to/your/project
62-
# git pull origin main
63-
# npm install
64-
# npm run build # if you have a build step, otherwise skip
65-
# pm2 restart all # or your preferred process manager
66-
# EOF
67-
# env:
68-
# SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
57+
# Step 4: Deploy to the server via SSH
58+
- name: Deploy to Server
59+
run: |
60+
ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SERVER_IP }} << 'EOF'
61+
cd /next-js-app/app
62+
git pull origin main
63+
npm install
64+
npm run build # if you have a build step, otherwise skip
65+
pm2 restart all # or your preferred process manager
66+
EOF
67+
env:
68+
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}

0 commit comments

Comments
 (0)