@@ -21,22 +21,22 @@ jobs:
|
|||||||
- 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,8 +47,12 @@ 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 successfully."
|
Write-Host "Deployment completed."
|
||||||
Reference in New Issue
Block a user