Skip to content

Commit

Permalink
integration work
Browse files Browse the repository at this point in the history
  • Loading branch information
my-git-mohit committed Oct 8, 2024
1 parent cb85564 commit 68652f8
Showing 1 changed file with 53 additions and 17 deletions.
70 changes: 53 additions & 17 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,63 @@ name: Integration

on:
push:
branches: [ "main" ]
branches:
- main # or your default branch
pull_request:
branches: [ "main" ]
branches:
- main

jobs:
build:

runs-on: ubuntu-latest

steps:
# Step 1: Checkout code
- name: Checkout code
uses: actions/checkout@v2

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

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build
- run: npm test
# Step 3: Install dependencies
- name: Install dependencies
run: npm i
# step 4 Build
- name: Run build
run: npm build
- name: Run Test
run: npm run test

# deploy:
# runs-on: ubuntu-latest
# needs: build # ensures the deploy job runs after the build job
# steps:
# # Step 1: Checkout code
# - name: Checkout code
# uses: actions/checkout@v2

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

# # Step 3: Install dependencies (again in the deployment environment)
# - name: Install dependencies
# run: npm install

# # Step 4: Deploy to the server via SSH
# - name: Deploy to Server
# run: |
# ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SERVER_IP }} << 'EOF'
# cd /path/to/your/project
# git pull origin main
# npm install
# npm run build # if you have a build step, otherwise skip
# pm2 restart all # or your preferred process manager
# EOF
# env:
# SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}

0 comments on commit 68652f8

Please sign in to comment.