Skip to content

Commit 8fbe0a8

Browse files
committed
integration work
1 parent 0f7f5b5 commit 8fbe0a8

File tree

1 file changed

+49
-34
lines changed

1 file changed

+49
-34
lines changed

.github/workflows/integration.yml

Lines changed: 49 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,64 @@ 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
14-
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/
19-
15+
2016
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 i
28-
- run: npm run build
17+
# Step 1: Checkout code
18+
- name: Checkout code
19+
uses: actions/checkout@v2
2920

30-
unit-test:
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
3126

32-
runs-on: ubuntu-latest
33-
34-
strategy:
35-
matrix:
36-
node-version: [18.x, 20.x, 22.x]
37-
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
27+
# Step 3: Install dependencies
28+
- name: Install dependencies
29+
run: npm i
30+
# step 4 Build
31+
- name:
32+
run: npm build
33+
# Step 5: Run tests
34+
- name: Run tests
35+
run: npm run test
3836

39-
steps:
40-
- uses: actions/checkout@v4
41-
- name: Use Node.js ${{ matrix.node-version }}
42-
uses: actions/setup-node@v4
43-
with:
44-
node-version: ${{ matrix.node-version }}
45-
cache: 'npm'
46-
- run: npm i
47-
- run: npm run test
37+
# deploy:
38+
# runs-on: ubuntu-latest
39+
# needs: build # ensures the deploy job runs after the build job
40+
# steps:
41+
# # Step 1: Checkout code
42+
# - name: Checkout code
43+
# uses: actions/checkout@v2
4844

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

51+
# # Step 3: Install dependencies (again in the deployment environment)
52+
# - name: Install dependencies
53+
# run: npm install
5054

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

0 commit comments

Comments
 (0)