variables: - &vlang_image 'git.rustybever.be/vieter/vlang:5d4c9dc9fc11bf8648541c934adb64f27cb94e37-alpine3.17' platform: 'linux/amd64' branches: exclude: [ main ] pipeline: docs: image: 'klakegg/hugo:ext-alpine' group: 'generate' commands: - apk add git - make docs api-docs: image: *vlang_image pull: true group: 'generate' commands: - make api-docs slate-docs: image: 'slatedocs/slate' group: 'generate' # Slate requires a specific directory to run in directory: '/srv/slate' commands: - echo "$PWD" - mv "$CI_WORKSPACE/docs/api" /srv/slate/source - bundle exec middleman build --clean --watcher-disable - mv build "$CI_WORKSPACE/docs/api-build" 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' secrets: - 'site_api_key' 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 api-docs.tar.gz https://rustybever.be/api/deploy?dir=api-docs-vieter' when: event: push branch: dev