This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
name: Node.js CI
|
name: Node.js CI/CD
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -15,20 +15,40 @@ jobs:
|
|||||||
|
|
||||||
- name: Check Git
|
- name: Check Git
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: git --version
|
run: |
|
||||||
|
git --version
|
||||||
|
|
||||||
- name: Check Node.js
|
- name: Check Node.js
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: node --version
|
run: |
|
||||||
|
node --version
|
||||||
|
|
||||||
- name: Check npm
|
- name: Check npm
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: npm --version
|
run: |
|
||||||
|
npm --version
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: npm ci
|
run: |
|
||||||
|
npm ci
|
||||||
|
|
||||||
- name: Check application
|
- name: Check application
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: node --check app.js
|
run: |
|
||||||
|
node --check app.js
|
||||||
|
|
||||||
|
- name: Deploy application
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
$deployPath = "D:\apps\my_temp\my-node-app"
|
||||||
|
|
||||||
|
if (!(Test-Path $deployPath)) {
|
||||||
|
New-Item -ItemType Directory -Path $deployPath -Force
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Deploying to $deployPath"
|
||||||
|
|
||||||
|
Copy-Item -Path ".\*" -Destination $deployPath -Recurse -Force
|
||||||
|
|
||||||
|
Write-Host "Deployment completed successfully."
|
||||||
|
|||||||
Reference in New Issue
Block a user