forked from vieter-v/vieter
ci: added steps to build & deploy slate docs
parent
1d034e670e
commit
a02b70e9a5
|
@ -9,7 +9,6 @@ pipeline:
|
||||||
commands:
|
commands:
|
||||||
- apk add git
|
- apk add git
|
||||||
- make docs
|
- make docs
|
||||||
- 'cd docs/public && tar czvf ../../docs.tar.gz *'
|
|
||||||
|
|
||||||
api-docs:
|
api-docs:
|
||||||
image: 'chewingbever/vlang:latest'
|
image: 'chewingbever/vlang:latest'
|
||||||
|
@ -17,25 +16,30 @@ pipeline:
|
||||||
group: 'generate'
|
group: 'generate'
|
||||||
commands:
|
commands:
|
||||||
- make api-docs
|
- make api-docs
|
||||||
- 'cd src/_docs && tar czvf ../../api-docs.tar.gz *'
|
|
||||||
|
|
||||||
deploy-docs:
|
slate-docs:
|
||||||
|
image: 'slatedocs/slate'
|
||||||
|
group: 'generate'
|
||||||
|
commands:
|
||||||
|
- cd docs/api
|
||||||
|
- bundle exec middleman build --clean
|
||||||
|
|
||||||
|
archive:
|
||||||
|
image: 'alpine'
|
||||||
|
commands:
|
||||||
|
- cp -r docs/api/build docs/public/api
|
||||||
|
- 'cd docs/public && tar czvf ../../docs.tar.gz *'
|
||||||
|
- 'cd src/_docs && tar czvf ../../api-docs.tar.gz *'
|
||||||
|
when:
|
||||||
|
event: push
|
||||||
|
branch: dev
|
||||||
|
|
||||||
|
deploy:
|
||||||
image: 'curlimages/curl'
|
image: 'curlimages/curl'
|
||||||
group: 'deploy'
|
|
||||||
secrets:
|
secrets:
|
||||||
- 'site_api_key'
|
- 'site_api_key'
|
||||||
commands:
|
commands:
|
||||||
- 'curl -XPOST --fail -s -H "Authorization: Bearer $SITE_API_KEY" -T docs.tar.gz https://rustybever.be/api/deploy?dir=docs-vieter'
|
- 'curl -XPOST --fail -s -H "Authorization: Bearer $SITE_API_KEY" -T docs.tar.gz https://rustybever.be/api/deploy?dir=docs-vieter'
|
||||||
when:
|
|
||||||
event: push
|
|
||||||
branch: dev
|
|
||||||
|
|
||||||
deploy-api-docs:
|
|
||||||
image: 'curlimages/curl'
|
|
||||||
group: 'deploy'
|
|
||||||
secrets:
|
|
||||||
- 'site_api_key'
|
|
||||||
commands:
|
|
||||||
- 'curl -XPOST --fail -s -H "Authorization: Bearer $SITE_API_KEY" -T api-docs.tar.gz https://rustybever.be/api/deploy?dir=api-docs-vieter'
|
- 'curl -XPOST --fail -s -H "Authorization: Bearer $SITE_API_KEY" -T api-docs.tar.gz https://rustybever.be/api/deploy?dir=api-docs-vieter'
|
||||||
when:
|
when:
|
||||||
event: push
|
event: push
|
||||||
|
|
Loading…
Reference in New Issue