@dbp-topics/sublibrary
Version:
[GitLab Repository](https://github.com/digital-blueprint/sublibrary-app) | [npmjs package](https://www.npmjs.com/package/@dbp-topics/sublibrary) | [Unpkg CDN](https://unpkg.com/browse/@dbp-topics/sublibrary/) | [Sublibrary Bundle](https://gitlab.tugraz.at
64 lines (56 loc) • 1.42 kB
YAML
image: registry.gitlab.tugraz.at/dbp/sublibrary/sublibrary/main:v1
cache:
key: $CI_PROJECT_PATH
paths:
- _yarn_cache
before_script:
- 'git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.tugraz.at/".insteadOf "git@gitlab.tugraz.at:"'
- git submodule sync
- git submodule update --init
- yarn config set cache-folder "$CI_PROJECT_DIR/_yarn_cache"
stages:
- test
- deploy
test:
stage: test
script:
- yarn install
- APP_ENV=development yarn run build
- yarn run test-full
linting:
stage: test
allow_failure: true
script:
- yarn install
- yarn run lint
publish:
stage: deploy
only:
refs:
- main
script:
# https://www.npmjs.com/settings/dbp-deploy/tokens
# NPM_TOKEN needs to be a "Publish" token with 2FA disabled!
- echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > ~/.npmrc
- yarn install
- yarn run build
# yarn always reports "https://registry.yarnpkg.com/@dbp-topics%2fsignature - Not found", so we are using npm directly
- npm run publish
deploy:
stage: deploy
except:
- schedules
only:
refs:
- main
- demo
- production
inherit:
variables: false
variables:
UPSTREAM_PROJECT_PATH: ${CI_PROJECT_PATH}
UPSTREAM_COMMIT_BRANCH: ${CI_COMMIT_BRANCH}
UPSTREAM_COMMIT_SHA: ${CI_COMMIT_SHA}
trigger:
project: dbp/deployer
strategy: depend