Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Karakas
SWP_SS24_Wetterdaten_sammeln
Commits
0e8472e5
Commit
0e8472e5
authored
May 11, 2024
by
Karakas
Browse files
Update .gitlab-ci.yml file
parent
616ad661
Pipeline
#9165
passed with stages
in 58 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
0e8472e5
# This file is a template, and might need editing before it works on your project.
image
:
node:18
# Use Node.js image for the pipeline
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Nodejs.gitlab-ci.yml
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
image
:
node:latest
stages
:
stages
:
-
build
-
deploy
-
deploy
# Define jobs
# This folder is cached between builds
build
:
# https://docs.gitlab.com/ee/ci/yaml/index.html#cache
stage
:
build
cache
:
script
:
-
cd frontend
# Change directory to the frontend folder
-
npm install
# Install dependencies
-
npm run build
# Build the React application
artifacts
:
paths
:
paths
:
-
frontend/
node_modules/
-
frontend/
build/
# Specify the artifacts to be passed to the next stage
deploy
:
pages
:
stage
:
deploy
stage
:
deploy
script
:
script
:
-
cd frontend
-
echo "deploy to https://transfer.hft-stuttgart.de/pages/$CI_PROJECT_PATH/"
-
npm install
# Add your deployment script here, for example:
-
npm run start
# - scp -r frontend/build/* user@your-server:/path/to/deploy
-
echo "Deploying to https://transfer.hft-stuttgart.de/pages/$CI_PROJECT_PATH/"
artifacts
:
paths
:
-
frontend/public
only
:
only
:
-
master
-
master
# Deploy only when changes are pushed to the master branch
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment