1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- ---
- kind: pipeline
- type: docker
- name: default
-
- steps:
-
- - name: restore cache
- image: drillster/drone-volume-cache
- settings:
- restore: true
- mount:
- - ./node_modules
- volumes:
- - name: cache
- path: /cache
-
- - name: npm install
- image: node:14
- commands:
- - npm install
-
- - name: npm run build
- image: node:14
- commands:
- - npm run build
-
- - name: rebuild cache
- image: drillster/drone-volume-cache
- settings:
- rebuild: true
- mount:
- - ./node_modules
- volumes:
- - name: cache
- path: /cache
-
- - name: npm run test
- image: node:14
- commands:
- - npm run test
-
- - name: build docs
- image: node:14
- commands:
- - npm run docs
- when:
- event:
- - tag
-
- - name: deliver docs
- image: node:12
- commands:
- - echo ${DRONE_BUILD_CREATED}
- - git clone https://gitea.nitowa.xyz/docs/${DRONE_REPO_NAME}.git; cd ${DRONE_REPO_NAME} && rm -rf ./*; cp -r ../docs/* .; cp ../LICENSE.md .
- - sed -i '1,3d; $d' README.md && echo "### Version\n\n${DRONE_TAG}\n" >> ./README.md
- - sed -i -e 1,4d ./globals.md && cat ./globals.md >> ./README.md
- - git add --all; git -c user.email="${DRONE_COMMIT_AUTHOR_EMAIL}" -c user.name="${DRONE_COMMIT_AUTHOR}" commit --all --allow-empty --message "generated from tag ${DRONE_TAG}"
- - (git tag ${DRONE_TAG} && git push --force origin master ${DRONE_TAG}) || true
- environment:
- GIT_USER:
- from_secret: git_user
- GIT_PASSWORD:
- from_secret: git_password
- when:
- event:
- - tag
-
- - name: npm publish
- image: plugins/npm
- settings:
- username: nitowa
- password:
- from_secret: npm_password
- email: peter.millauer@gmail.com
- when:
- event:
- - tag
-
- volumes:
- - name: cache
- host:
- path: /tmp
|