From 5a400ad32dc61b030bb8d069ffcfe5da06aaf5b5 Mon Sep 17 00:00:00 2001 From: Justin Wernick Date: Mon, 12 Jun 2023 22:42:39 +0200 Subject: First attempts at docs publishing from CI --- .woodpecker.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.woodpecker.yml b/.woodpecker.yml index c8cc222..b7cf42d 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,3 +1,7 @@ +when: + branch: + exclude: pages + pipeline: test: image: node:lts @@ -8,3 +12,25 @@ pipeline: image: node:lts commands: - npm audit + + docs: + image: node:lts + commands: + - npm run docs + + publish-pages: + image: node:lts + secrets: [ cbtoken ] + commands: + - git config --global user.email "woodpecker@worthe-it.co.za" + - git config --global user.name "CI Builder" + - git clone -b pages https://$CBTOKEN@codeberg.org/$CI_REPO.git pages + - cp -r dist/docs "pages/$CI_COMMIT_TAG" + - cd pages + - git add --all + - git commit -m "Woodpecker CI Generated Docs" + - git push + when: + # Push new version when version tag is created + event: tag + tag: v* -- cgit v1.2.3