From 7f0ff4437bd996666a55493d6d808b252b27b368 Mon Sep 17 00:00:00 2001 From: UnicornChance Date: Tue, 14 Jan 2025 10:28:44 -0700 Subject: [PATCH] fix: add dev docs task --- .gitignore | 2 ++ tasks.yaml | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/.gitignore b/.gitignore index 51b6e31e..da83c35e 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ uds-core/** src/extra-jars/ src/test/cypress/node_modules/** src/plugin/target/** +uds-docs/ +uds-docs/** diff --git a/tasks.yaml b/tasks.yaml index 7ce72ad5..047c7df0 100644 --- a/tasks.yaml +++ b/tasks.yaml @@ -157,3 +157,23 @@ tasks: actions: - description: Add the SPDX license identifier to source files task: remote:fix-license + + # Note that due to cloning the docs repo (which is private) this task will require organization access to the repo + # This task does not clone in/manage docs outside of the identity repo so you may hit some 404s during development + - name: dev-docs + description: "Start the dev docs server" + actions: + - description: "Cleanup previous runs" + cmd: | + rm -rf uds-docs + - description: "Clone the docs repo and symlink the reference docs" + cmd: | + git clone https://github.com/defenseunicorns/uds-docs.git uds-docs + rm -rf uds-docs/src/content/docs/reference uds-docs/src/content/docs/.images + # This only symlinks the reference and images folders since these are the only docs we use in the docs site + ln -s $(pwd)/docs/reference uds-docs/src/content/docs/reference + ln -s $(pwd)/docs/.images uds-docs/src/content/docs/.images + - description: "Start the docs server with npm (this will run until you stop it)" + cmd: | + # Actual startup takes up to a minute because of the npm install + cd uds-docs && npm i && npm run dev