diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..9c224a3eefd3b0995f80f34ec173c8367a8e8672 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,43 @@ +--- +image: node:lts-slim + +stages: + - test + - build + - deploy + +variables: + NPM_ORGANIZATION: lydra + +cache: + key: ${CI_COMMIT_REF_SLUG} + paths: + - node_modules/ + +before_script: + - npm ci + +pages: + stage: build + script: + - npm run build + - mv public public.dist + - mv dist public + artifacts: + paths: + - public + +publish_gitlab_registry: + stage: deploy + needs: + - job: pages + artifacts: true + dependencies: + - pages + script: + - npm config set ${NPM_ORGANIZATION}:registry ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/npm/ + - npm config set -- '${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/npm/:_authToken' "${CI_JOB_TOKEN}" + - npm config set -- '${CI_API_V4_URL}/packages/npm/:_authToken' "${CI_JOB_TOKEN}" + - npm publish + # rules: + # - if: $CI_COMMIT_TAG diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000000000000000000000000000000000000..e44a38e0803edbf4823dcabc9ee9623b03771e60 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v18.12.1