simplified deliver docs

This commit is contained in:
Daniel Huebleitner
2019-10-28 21:34:51 +01:00
parent bff16acab0
commit a0d21c1e1c
2 changed files with 7 additions and 21 deletions
+6 -20
View File
@@ -40,10 +40,9 @@ steps:
commands: commands:
- npm run test - npm run test
- name: rebuild documentation - name: build docs
image: node:12 image: node:12
commands: commands:
- rm -rf docs
- npm run docs - npm run docs
when: when:
event: event:
@@ -60,27 +59,14 @@ steps:
event: event:
- tag - tag
- name: deploy documentation - name: deliver docs
image: node:12 image: node:12
commands: commands:
- echo ${DRONE_BUILD_CREATED} - echo ${DRONE_BUILD_CREATED}
- git config --global user.email "${DRONE_COMMIT_AUTHOR_EMAIL}" - git clone https://www.versioncontrol.me/frontwork-documentation/${DRONE_REPO_NAME}.git && cd ${DRONE_REPO_NAME} && rm -rf ./*; cp -r ../docs/* .
- git config --global user.name "${DRONE_COMMIT_AUTHOR}" - sed -i '$ d' README.md && echo "### Version\n\n${DRONE_TAG}\n" >> ./README.md
- echo "clone ${DRONE_REPO_NAME}"; git clone https://www.versioncontrol.me/frontwork-documentation/${DRONE_REPO_NAME}.git - sed -i -e 1,4d ./globals.md && cat ./globals.md >> ./README.md
- cd ${DRONE_REPO_NAME} - git commit --all --allow-empty --message "drone tag: ${DRONE_TAG}" --author "${DRONE_COMMIT_AUTHOR} <${DRONE_COMMIT_AUTHOR_EMAIL}>"
- git reset HEAD --hard
- echo "remove files in ${DRONE_REPO_NAME}"; rm -rf ./*
- echo "copy docs to ${DRONE_REPO_NAME}"; cp -r ../docs/* .
- ls
- rm ./README.md
- head -n -2 ../README.md > ./README.md
- echo "## Version" >> ./README.md
- echo "${DRONE_TAG}" >> ./README.md
- echo "" >> ./README.md
- sed -i -e 1,4d ./globals.md
- cat globals.md >> ./README.md
- echo "add files in ${DRONE_REPO_NAME}"; git add -A
- git commit --allow-empty -m "Drone tagged as ${DRONE_TAG}"
- git push --force origin master - git push --force origin master
environment: environment:
GIT_USER: GIT_USER:
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "rpclibrary", "name": "rpclibrary",
"version": "1.2.5", "version": "1.3.1",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {