From a02b70e9a5cffcb98a8ef86561a4b66f5b06e365 Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Fri, 3 Jun 2022 17:32:32 +0200 Subject: [PATCH] ci: added steps to build & deploy slate docs --- .woodpecker/.docs.yml | 32 ++++++++++++++++------------- docs/content/{api.md => api-old.md} | 0 2 files changed, 18 insertions(+), 14 deletions(-) rename docs/content/{api.md => api-old.md} (100%) diff --git a/.woodpecker/.docs.yml b/.woodpecker/.docs.yml index fc525e2..f456759 100644 --- a/.woodpecker/.docs.yml +++ b/.woodpecker/.docs.yml @@ -9,7 +9,6 @@ pipeline: commands: - apk add git - make docs - - 'cd docs/public && tar czvf ../../docs.tar.gz *' api-docs: image: 'chewingbever/vlang:latest' @@ -17,25 +16,30 @@ pipeline: group: 'generate' commands: - 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' - 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=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' when: event: push diff --git a/docs/content/api.md b/docs/content/api-old.md similarity index 100% rename from docs/content/api.md rename to docs/content/api-old.md