fix: Updated CI/CD configuration
This commit is contained in:
@@ -7,6 +7,7 @@ stages: # Define the stages of the pipeline.
|
||||
web-build: # This job runs in the build stage, which runs first.
|
||||
stage: build
|
||||
image: node:24
|
||||
parallel: 2
|
||||
script:
|
||||
- cd Web
|
||||
- npm install
|
||||
@@ -18,10 +19,10 @@ web-build: # This job runs in the build stage, which runs first.
|
||||
api-build:
|
||||
stage: build
|
||||
image: mcr.microsoft.com/dotnet/sdk:8.0
|
||||
parallel: 2
|
||||
script:
|
||||
- ls -halt
|
||||
- cd Api
|
||||
- dotnet build Api.csproj --output ./build --runtime linux-x64
|
||||
- dotnet publish Api.csproj --output ./build --runtime linux-x64 --configuration Release --self-contained true
|
||||
artifacts:
|
||||
paths:
|
||||
- Api/build
|
||||
@@ -48,4 +49,7 @@ deploy-job: # This job runs in the deploy stage.
|
||||
- deployment
|
||||
script:
|
||||
- cp -ir Web/dist/Web/browser/* /var/www/html
|
||||
- systemctl stop api.service
|
||||
- cp -ir Api/build/* /var/api
|
||||
- systemctl start api.service
|
||||
- echo "Application successfully deployed."
|
||||
|
||||
Reference in New Issue
Block a user