From e5d50f3a59561a1b7a7f65d75888fdcd6d3e4b75 Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Sat, 30 Apr 2022 23:36:52 +0200 Subject: [PATCH] ci(docs): build & deploy docs in CI --- .woodpecker/.docs.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .woodpecker/.docs.yml diff --git a/.woodpecker/.docs.yml b/.woodpecker/.docs.yml new file mode 100644 index 0000000..51d49f7 --- /dev/null +++ b/.woodpecker/.docs.yml @@ -0,0 +1,42 @@ +platform: 'linux/amd64' +branches: + exclude: [ main ] + +pipeline: + docs: + image: 'klakegg/hugo:alpine' + group: 'generate' + commands: + - apk add git + - make docs + - 'cd docs/public && tar czvf ../../docs.tar.gz *' + + api-docs: + image: 'chewingbever/vlang:latest' + pull: true + group: 'generate' + commands: + - make api-docs + - 'cd src/_docs && tar czvf ../../api-docs.tar.gz *' + + deploy-docs: + image: 'curlimages/curl' + group: 'deploy' + 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=vieter-docs' + 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=vieter-api-docs' + when: + event: push + branch: dev