36 lines
916 B
YAML
36 lines
916 B
YAML
|
|
stages: # Define the stages of the pipeline.
|
|
- build
|
|
#- test
|
|
- release
|
|
|
|
install-job: # This job runs in the build stage, which runs first.
|
|
stage: build
|
|
image: node:24
|
|
script:
|
|
- cd Web
|
|
- npm install
|
|
- npm run build
|
|
artifacts: # Artifacts are files that are passed between stages.
|
|
paths:
|
|
- Web/dist/Web/browser # The 'dist' directory will be available in the next stage.
|
|
|
|
semantic-release:
|
|
image: node:24
|
|
stage: release
|
|
script:
|
|
- echo $GL_TOKEN
|
|
- npm install --save-dev @semantic-release/gitlab
|
|
- npx semantic-release --debug
|
|
only:
|
|
- main
|
|
|
|
deploy-job: # This job runs in the deploy stage.
|
|
stage: release # It only runs when *both* jobs in the test stage complete successfully.
|
|
environment: production
|
|
tags:
|
|
- deployment
|
|
script:
|
|
- cp -ir Web/dist/Web/browser/* /var/www/html
|
|
- echo "Application successfully deployed."
|