Skip to content

Commit 68652f8

Browse files
committed
integration work
1 parent cb85564 commit 68652f8

File tree

1 file changed

+53
-17
lines changed

1 file changed

+53
-17
lines changed

.github/workflows/integration.yml

Lines changed: 53 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,63 @@ name: Integration
33

44
on:
55
push:
6-
branches: [ "main" ]
6+
branches:
7+
- main # or your default branch
78
pull_request:
8-
branches: [ "main" ]
9+
branches:
10+
- main
911

1012
jobs:
1113
build:
12-
1314
runs-on: ubuntu-latest
15+
16+
steps:
17+
# Step 1: Checkout code
18+
- name: Checkout code
19+
uses: actions/checkout@v2
1420

15-
strategy:
16-
matrix:
17-
node-version: [18.x, 20.x, 22.x]
18-
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
21+
# Step 2: Set up the environment
22+
- name: Set up Node.js
23+
uses: actions/setup-node@v2
24+
with:
25+
node-version: '20' # specify your Node.js version
1926

20-
steps:
21-
- uses: actions/checkout@v4
22-
- name: Use Node.js ${{ matrix.node-version }}
23-
uses: actions/setup-node@v4
24-
with:
25-
node-version: ${{ matrix.node-version }}
26-
cache: 'npm'
27-
- run: npm ci
28-
- run: npm run build
29-
- run: npm test
27+
# Step 3: Install dependencies
28+
- name: Install dependencies
29+
run: npm i
30+
# step 4 Build
31+
- name: Run build
32+
run: npm build
33+
- name: Run Test
34+
run: npm run test
35+
36+
# deploy:
37+
# runs-on: ubuntu-latest
38+
# needs: build # ensures the deploy job runs after the build job
39+
# steps:
40+
# # Step 1: Checkout code
41+
# - name: Checkout code
42+
# uses: actions/checkout@v2
43+
44+
# # Step 2: Set up Node.js (again for deployment environment)
45+
# - name: Set up Node.js
46+
# uses: actions/setup-node@v2
47+
# with:
48+
# node-version: '14'
49+
50+
# # Step 3: Install dependencies (again in the deployment environment)
51+
# - name: Install dependencies
52+
# run: npm install
53+
54+
# # Step 4: Deploy to the server via SSH
55+
# - name: Deploy to Server
56+
# run: |
57+
# ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SERVER_IP }} << 'EOF'
58+
# cd /path/to/your/project
59+
# git pull origin main
60+
# npm install
61+
# npm run build # if you have a build step, otherwise skip
62+
# pm2 restart all # or your preferred process manager
63+
# EOF
64+
# env:
65+
# SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}

0 commit comments

Comments
 (0)