2022-09-15 13:42:49 +02:00
|
|
|
variables:
|
2023-02-15 20:50:55 +01:00
|
|
|
- &vlang_image 'git.rustybever.be/vieter/vlang:5d4c9dc9fc11bf8648541c934adb64f27cb94e37-alpine3.17'
|
2022-09-15 13:42:49 +02:00
|
|
|
|
2022-04-30 23:36:52 +02:00
|
|
|
platform: 'linux/amd64'
|
|
|
|
branches:
|
|
|
|
exclude: [ main ]
|
|
|
|
|
|
|
|
pipeline:
|
|
|
|
docs:
|
2022-06-22 09:44:25 +02:00
|
|
|
image: 'klakegg/hugo:ext-alpine'
|
2022-04-30 23:36:52 +02:00
|
|
|
group: 'generate'
|
|
|
|
commands:
|
|
|
|
- apk add git
|
|
|
|
- make docs
|
|
|
|
|
|
|
|
api-docs:
|
2022-09-15 13:42:49 +02:00
|
|
|
image: *vlang_image
|
2022-04-30 23:36:52 +02:00
|
|
|
pull: true
|
|
|
|
group: 'generate'
|
|
|
|
commands:
|
|
|
|
- make api-docs
|
|
|
|
|
2022-06-03 17:32:32 +02:00
|
|
|
slate-docs:
|
|
|
|
image: 'slatedocs/slate'
|
|
|
|
group: 'generate'
|
2022-04-30 23:36:52 +02:00
|
|
|
commands:
|
2022-06-03 17:32:32 +02:00
|
|
|
- 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 *'
|
2022-06-03 22:40:29 +02:00
|
|
|
- 'cd ../../src/_docs && tar czvf ../../api-docs.tar.gz *'
|
2022-04-30 23:36:52 +02:00
|
|
|
when:
|
|
|
|
event: push
|
|
|
|
branch: dev
|
|
|
|
|
2022-06-03 17:32:32 +02:00
|
|
|
deploy:
|
2022-04-30 23:36:52 +02:00
|
|
|
image: 'curlimages/curl'
|
|
|
|
secrets:
|
|
|
|
- 'site_api_key'
|
|
|
|
commands:
|
2022-06-03 17:32:32 +02:00
|
|
|
- 'curl -XPOST --fail -s -H "Authorization: Bearer $SITE_API_KEY" -T docs.tar.gz https://rustybever.be/api/deploy?dir=docs-vieter'
|
2022-05-01 12:11:07 +02:00
|
|
|
- 'curl -XPOST --fail -s -H "Authorization: Bearer $SITE_API_KEY" -T api-docs.tar.gz https://rustybever.be/api/deploy?dir=api-docs-vieter'
|
2022-04-30 23:36:52 +02:00
|
|
|
when:
|
|
|
|
event: push
|
|
|
|
branch: dev
|