diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6b2916c..b5973b8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Node.js CI +name: Node.js CI/CD on: push: @@ -15,20 +15,40 @@ jobs: - name: Check Git shell: powershell - run: git --version + run: | + git --version - name: Check Node.js shell: powershell - run: node --version + run: | + node --version - name: Check npm shell: powershell - run: npm --version + run: | + npm --version - name: Install dependencies shell: powershell - run: npm ci + run: | + npm ci - name: Check application 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."