Answer the question
In order to leave comments, you need to log in
Gitlab CI/CD how to deliver an artifact to my server?
I want to make my life a little easier and automate some processes.
Description of my task:
There is a project on Gitlab vue ui
When I do a push to a turnip, I want to launch the mechanisms for building and delivering ready-made code to the production server.
What I already have.
gitlab-runner
Installed and authorized.
I spied an example on the off site vue, pushed it into a turnip and as a result the assembly is completed.
pages: # задание должно быть именованными страницами
image: node:latest
stage: deploy
script:
- npm ci
- npm run build
- mv public public-vue # GitLab Pages хук для каталога public
- mv dist public # переименование каталога dist (результат команды npm run build)
# опционально, можно активировать поддержку gzip с помощью следующей строки:
- find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -exec gzip -f -k {} \;
artifacts:
paths:
- public # путь к артефакту должен быть /public для GitLab Pages
only:
- develop
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question