From a0b8ed27d2b6fbf93c74433df297c18468be9d53 Mon Sep 17 00:00:00 2001 From: Jannik Stehle Date: Wed, 16 Apr 2025 10:10:50 +0200 Subject: [PATCH] ci: add design-system docs to build Adds a ci step to fetch the design-system docs from the web repository so they get included in the final build of the docs. Also adds the command `pnpm fetch-design-system-docs` to fetch them locally. Run this before running `pnpm start` to include the design-systems docs in your local build. --- .batchfile | 3 +++ .gitignore | 3 +++ .woodpecker/build.yaml | 6 +++++- package.json | 3 ++- 4 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 .batchfile diff --git a/.batchfile b/.batchfile new file mode 100644 index 00000000..3a2f9de0 --- /dev/null +++ b/.batchfile @@ -0,0 +1,3 @@ +# Usage: ;branch;TargetFolder + +https://github.com/opencloud-eu/web;design-system-docs;static/design-system diff --git a/.gitignore b/.gitignore index 9c912634..433f6299 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,9 @@ /build /static/likec4 +# design-system docs +/static/design-system + # Generated files .docusaurus .cache-loader diff --git a/.woodpecker/build.yaml b/.woodpecker/build.yaml index 9b0ea172..c02be80c 100644 --- a/.woodpecker/build.yaml +++ b/.woodpecker/build.yaml @@ -2,9 +2,13 @@ when: - event: push branch: ${CI_REPO_DEFAULT_BRANCH} - - event: [ pull_request, manual, tag] + - event: [pull_request, manual, tag] steps: + - name: fetch-design-system-docs + image: quay.io/thegeeklab/git-batch + commands: + - git batch -vv - name: build image: owncloudci/nodejs:20 commands: diff --git a/package.json b/package.json index 17e5234c..d718bd24 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,8 @@ "write-translations": "docusaurus write-translations", "write-heading-ids": "docusaurus write-heading-ids", "typecheck": "tsc", - "build-likec4": "likec4 build ./assets/likec4 --base /likec4 -o ./static/likec4" + "build-likec4": "likec4 build ./assets/likec4 --base /likec4 -o ./static/likec4", + "fetch-design-system-docs": "docker run --rm -w $(pwd) -v $(pwd):$(pwd) quay.io/thegeeklab/git-batch" }, "dependencies": { "@docusaurus/core": "3.7.0",