Update Auto
Node.js CI/CD / build (push) Failing after 22s

This commit is contained in:
John
2026-09-23 11:02:16 +05:30
parent fd95bf52ae
commit dd22d02945
2 changed files with 8 additions and 16 deletions
+6 -15
View File
@@ -15,28 +15,23 @@ jobs:
- name: Check Git - name: Check Git
shell: powershell shell: powershell
run: | run: git --version
git --version
- name: Check Node.js - name: Check Node.js
shell: powershell shell: powershell
run: | run: node --version
node --version
- name: Check npm - name: Check npm
shell: powershell shell: powershell
run: | run: npm --version
npm --version
- name: Install dependencies - name: Install dependencies
shell: powershell shell: powershell
run: | run: npm ci
npm ci
- name: Check application - name: Check application
shell: powershell shell: powershell
run: | run: node --check app.js
node --check app.js
- name: Deploy application - name: Deploy application
shell: powershell shell: powershell
@@ -47,12 +42,8 @@ jobs:
New-Item -ItemType Directory -Path $deployPath -Force New-Item -ItemType Directory -Path $deployPath -Force
} }
Write-Host "Deploying application..."
Copy-Item -Path ".\*" -Destination $deployPath -Recurse -Force Copy-Item -Path ".\*" -Destination $deployPath -Recurse -Force
Write-Host "Restarting Node.js application..."
pm2 restart my-node-app pm2 restart my-node-app
Write-Host "Deployment completed." Write-Host "Deployment completed successfully."
+2 -1
View File
@@ -14,7 +14,8 @@ const server = http.createServer((req, res) => {
<title>My Node App</title> <title>My Node App</title>
</head> </head>
<body> <body>
<h1>Hello from Node.js!</h1> <h1>Hello from Node.js!</h1>
<h1>CI-CD</h1>
<p>Welcome, This application is running on Windows 10.</p> <p>Welcome, This application is running on Windows 10.</p>
</body> </body>
</html> </html>