Skip to content
Snippets Groups Projects
Commit e305ef62 authored by Aidan's avatar Aidan
Browse files

chore: Add GitLab CI/CD configuration for build and deploy stages

parent 58dd5ecd
No related branches found
No related tags found
No related merge requests found
Pipeline #4920 failed
stages:
- build
- deploy
variables:
# Define the NPM registry and NPM token (you should configure these as environment variables in GitLab CI/CD settings)
NPM_REGISTRY: "https://registry.npmjs.org/"
NPM_TOKEN: $NPM_TOKEN
cache:
paths:
- node_modules/
before_script:
- npm install
build:
stage: build
script:
- npm run build
artifacts:
paths:
- dist/
expire_in: 1 day
publish:
stage: deploy
script:
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
- npm publish --registry $NPM_REGISTRY
only:
- master
when: manual
environment:
name: production
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment