@panoramax/web-viewer
Version:
Panoramax web viewer for geolocated pictures
79 lines (75 loc) • 2.12 kB
YAML
# Testing
viewer-test:
stage: test
image: node:16
cache:
paths:
- node_modules
variables:
CI: 1
script:
- npm install --legacy-peer-deps
- npm run lint
- npm run test
# Release publishing on npm
viewer-publish:
stage: deploy
only:
refs:
- tags
image: node:16
cache:
paths:
- node_modules
variables:
CI: 1
script:
- npm install --legacy-peer-deps
- npm run build
- echo "//registry.npmjs.org/:always-auth=true" > ~/.npmrc
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc
- npm publish --userconfig=~/.npmrc --access=public --registry=https://registry.npmjs.org/
# Develop publishing on npm
viewer-publish-develop-tag:
stage: deploy
only:
- develop
image: node:16
cache:
paths:
- node_modules
artifacts:
paths:
- build
variables:
CI: 1
script:
- npm install --legacy-peer-deps
- npm run build
- echo "//registry.npmjs.org/:always-auth=true" > ~/.npmrc
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc
- VERSION=`npm view @panoramax/web-viewer version` || VERSION=`npm view geovisio version`
- npm version --no-git-tag-version $VERSION-develop-$CI_COMMIT_SHORT_SHA
- npm publish --tag develop --userconfig=~/.npmrc --access=public --registry=https://registry.npmjs.org/
# Develop publishing on Gitlab Pages
pages:
stage: deploy
needs:
- viewer-publish-develop-tag
only:
- develop
image: python:3-bookworm
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip
script:
- >
cp mkdocs.yml mkdocs_dev.yml && sed -i 's|^site_url.*|site_url: https://viewer.geovisio.fr/docs|' mkdocs_dev.yml
- pip3 install mkdocs-material
- mkdocs build -d build/docs -f mkdocs_dev.yml
artifacts:
paths:
- build
publish: build