feat: initial itpp-docs setup with MkDocs Material
Publish Docs Site / build (push) Failing after 5s
Publish Docs Site / build (push) Failing after 5s
- mkdocs.yml with dark slate theme, nav for 12 ITPP projects - build-docs.sh aggregates docs from all project repos - .gitea/workflows/docs-publish.yml for nightly rebuild+deploy - README and CHANGELOG for the itpp-docs repo itself - docs-source/ populated from all 12 repos - site/ ready for deployment to docs.itpropartner.com
This commit is contained in:
Executable
+113
@@ -0,0 +1,113 @@
|
||||
#!/bin/bash
|
||||
# build-docs.sh — Aggregate docs from all ITPP projects into docs-source/
|
||||
# Run: bash build-docs.sh
|
||||
set -euo pipefail
|
||||
|
||||
DOCS_SOURCE="docs-source"
|
||||
REPO_BASE="https://git.itpropartner.com/ippadmin"
|
||||
TOKEN="1761daa2c537fb72b365e54619208329d8e3ad33"
|
||||
|
||||
# List of repos to pull docs from
|
||||
REPOS=(
|
||||
"itpp-infrastructure"
|
||||
"itpp-standards"
|
||||
"transitpin"
|
||||
"homelab"
|
||||
"scripts"
|
||||
"fleettracker360"
|
||||
"shark-game"
|
||||
"verdicttank"
|
||||
"apex-track"
|
||||
"boxpilot"
|
||||
"osint-tool"
|
||||
"launchcheck"
|
||||
)
|
||||
|
||||
# Clean previous build
|
||||
rm -rf "$DOCS_SOURCE"
|
||||
mkdir -p "$DOCS_SOURCE"
|
||||
|
||||
for repo in "${REPOS[@]}"; do
|
||||
echo "=== Pulling docs from $repo ==="
|
||||
REPO_DIR="/tmp/itpp-docs-build/$repo"
|
||||
DOC_DIR="$DOCS_SOURCE/$repo"
|
||||
|
||||
if [ -d "$REPO_DIR" ]; then
|
||||
# Fetch latest if already cloned
|
||||
git -C "$REPO_DIR" fetch origin 2>/dev/null || true
|
||||
git -C "$REPO_DIR" reset --hard origin/main 2>/dev/null || true
|
||||
else
|
||||
mkdir -p "$(dirname "$REPO_DIR")"
|
||||
git clone --depth 1 "https://ippadmin:${TOKEN}@git.itpropartner.com/ippadmin/${repo}.git" "$REPO_DIR" 2>&1 || {
|
||||
echo "WARNING: Failed to clone $repo — skipping"
|
||||
continue
|
||||
}
|
||||
fi
|
||||
|
||||
mkdir -p "$DOC_DIR"
|
||||
|
||||
# Copy docs/ directory if it exists
|
||||
if [ -d "$REPO_DIR/docs" ]; then
|
||||
cp -r "$REPO_DIR/docs/"* "$DOC_DIR/" 2>/dev/null || true
|
||||
echo " Copied docs/ directory"
|
||||
fi
|
||||
|
||||
# Copy README.md as index.md if no docs/index.md exists
|
||||
if [ ! -f "$DOC_DIR/index.md" ] && [ -f "$REPO_DIR/README.md" ]; then
|
||||
# Convert README.md to index.md: strip first H1 line, prefix repo name
|
||||
{
|
||||
echo "# ${repo}"
|
||||
echo
|
||||
tail -n +2 "$REPO_DIR/README.md"
|
||||
} > "$DOC_DIR/index.md"
|
||||
echo " Created index.md from README.md"
|
||||
fi
|
||||
|
||||
# Copy CHANGELOG.md
|
||||
if [ -f "$REPO_DIR/CHANGELOG.md" ]; then
|
||||
cp "$REPO_DIR/CHANGELOG.md" "$DOC_DIR/"
|
||||
echo " Copied CHANGELOG.md"
|
||||
fi
|
||||
|
||||
# Copy CONTRIBUTING.md if it exists
|
||||
if [ -f "$REPO_DIR/CONTRIBUTING.md" ]; then
|
||||
cp "$REPO_DIR/CONTRIBUTING.md" "$DOC_DIR/"
|
||||
echo " Copied CONTRIBUTING.md"
|
||||
fi
|
||||
|
||||
echo " Done with $repo"
|
||||
done
|
||||
|
||||
# Create top-level index.md
|
||||
cat > "$DOCS_SOURCE/index.md" << 'INDEXEOF'
|
||||
# IT Pro Partner Documentation
|
||||
|
||||
Welcome to the IT Pro Partner centralized documentation site.
|
||||
|
||||
## Projects
|
||||
|
||||
| Project | Description | Repo |
|
||||
|---|---|---|
|
||||
| [ITPP Infrastructure](itpp-infrastructure/) | Server inventory, DNS, architecture | [Repo](https://git.itpropartner.com/ippadmin/itpp-infrastructure) |
|
||||
| [ITPP Standards](itpp-standards/) | Documentation standards & templates | [Repo](https://git.itpropartner.com/ippadmin/itpp-standards) |
|
||||
| [TransitPin](transitpin/) | White-label transportation portal | [Repo](https://git.itpropartner.com/ippadmin/transitpin) |
|
||||
| [HomeLab](homelab/) | Home lab infrastructure automation | [Repo](https://git.itpropartner.com/ippadmin/homelab) |
|
||||
| [Scripts](scripts/) | Operations and automation scripts | [Repo](https://git.itpropartner.com/ippadmin/scripts) |
|
||||
| [FleetTracker360](fleettracker360/) | GPS fleet tracking platform | [Repo](https://git.itpropartner.com/ippadmin/fleettracker360) |
|
||||
| [Shark Game](shark-game/) | Shark Attack Fantasy League | [Repo](https://git.itpropartner.com/ippadmin/shark-game) |
|
||||
| [VerdictTank](verdicttank/) | Product review and validation platform | [Repo](https://git.itpropartner.com/ippadmin/verdicttank) |
|
||||
| [Apex Track](apex-track/) | Track event management | [Repo](https://git.itpropartner.com/ippadmin/apex-track) |
|
||||
| [BoxPilot](boxpilot/) | Logistics operations platform | [Repo](https://git.itpropartner.com/ippadmin/boxpilot) |
|
||||
| [OSINT Tool](osint-tool/) | OSINT people search & skip tracing | [Repo](https://git.itpropartner.com/ippadmin/osint-tool) |
|
||||
| [LaunchCheck](launchcheck/) | Startup validation SaaS | [Repo](https://git.itpropartner.com/ippadmin/launchcheck) |
|
||||
|
||||
## About
|
||||
|
||||
This site is auto-generated by [mkdocs-material](https://squidfunk.github.io/mkdocs-material/)
|
||||
from source repositories hosted on [Gitea](https://git.itpropartner.com/).
|
||||
Rebuilt nightly via Gitea Actions.
|
||||
INDEXEOF
|
||||
|
||||
echo "=== Build complete ==="
|
||||
echo "Source files in: $DOCS_SOURCE/"
|
||||
ls -la "$DOCS_SOURCE/" | head -20
|
||||
Reference in New Issue
Block a user