-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathjustfile
More file actions
141 lines (117 loc) Β· 6.25 KB
/
justfile
File metadata and controls
141 lines (117 loc) Β· 6.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# justfile for GIG Cymru NHS Wales - Architecture project
#
# This justfile provides commands for building, serving, and managing the
# architecture documentation site built with Zensical.
#
# Quick start:
# just - Run the full setup and start the dev server
# just --list - Show all available commands
# just --help - Show Just command-line help
# Project URLs
local_url := "http://127.0.0.1:8000"
prod_url := "https://gigcymru.github.io/architecture"
# ============================================================================
# Development Workflow
# ============================================================================
# Run full setup: install dependencies, sync environment, build site, and start server
default: install sync build run
# Display all available commands with descriptions
help:
@just --list
# ============================================================================
# Setup & Dependencies
# ============================================================================
# Install uv package manager (required for Python dependency management)
install:
@echo "π¦ Installing uv package manager..."
curl -LsSf https://astral.sh/uv/install.sh | sh
@echo "β
uv is now installed and ready to use"
@echo " Run 'just sync' to install project dependencies"
# Synchronize Python dependencies using uv (creates/updates virtual environment)
sync:
@echo "π Synchronizing project dependencies with uv..."
uv sync
@echo "β
Dependencies installed and virtual environment configured"
@echo " Run 'just build' to build the documentation site"
# ============================================================================
# Documentation Building & Serving
# ============================================================================
# Build the documentation site (output to ./site directory)
build:
@echo "ποΈ Building documentation site with Zensical..."
uv run zensical build
@echo "β
Documentation site built successfully"
@echo " Output: ./site/"
@echo " Run 'just run' to start the local server"
# Start the local development server (auto-reloads on file changes)
run:
@echo "π Starting local development server..."
@echo "π Documentation will be available at: {{local_url}}"
@echo " Press Ctrl+C to stop the server"
uv run zensical serve
# ============================================================================
# Deployment
# ============================================================================
# Build and deploy documentation to GitHub Pages (requires push permissions)
deploy:
@echo "π Building and deploying to GitHub Pages..."
uv run zensical build
@echo "π€ Pushing to gh-pages branch..."
uv run ghp-import -n -p -f -m "Update documentation" site
@echo "β
Documentation deployed successfully!"
@echo "π Live site: {{prod_url}}"
# ============================================================================
# Quality Assurance
# ============================================================================
# Run all quality checks (linting, spell checking, link checking, sync manifest verification, and nav checks)
qa: lint spell check-links verify-sync-manifest list-sync-excluded check-sync-excluded-nav
# Run markdown linter on all documentation files (requires npm install)
lint:
@echo "π Linting markdown files with markdownlint-cli2..."
npx markdownlint-cli2 "doc/**/*.md" --config .markdownlint-cli2.jsonc
@echo "β
Markdown linting complete - no issues found!"
# Run spell checker on all documentation files (requires npm install)
# Note: GitHub Actions uses streetsidesoftware/cspell-action for inline PR annotations
spell:
@echo "π Spell checking files with cspell..."
npx cspell-cli "doc/**/*.md"
@echo "β
Spell checking complete - no issues found!"
# Check for broken internal links in markdown files. Pass `-h` to show help.
check-links *args:
@echo "π Checking internal links..."
@uv run scripts/check-links.py {{args}}
@echo "β
Internal link check complete - no issues found!"
# Verify that all files in sync-public.toml exist in the repository. Pass `-h` to show help.
verify-sync-manifest *args:
@echo "π Verifying sync manifest files exist..."
@uv run scripts/verify-sync-manifest.py {{args}}
@echo "β
Sync manifest verification complete - no issues found!"
# List git-tracked files excluded from sync-public.toml. Pass `-h` to show help.
list-sync-excluded *args:
@echo "π Listing files excluded from sync manifest..."
@uv run scripts/list-sync-excluded-files.py {{args}}
@echo "β
Excluded file listing complete!"
# Check for navigation entries excluded from sync-public.toml. Pass `-h` to show help.
check-sync-excluded-nav *args:
@echo "π§ Checking navigation entries against sync manifest..."
@uv run scripts/check-sync-excluded-nav.py {{args}}
@echo "β
Navigation exclusion check complete - no issues found!"
# ============================================================================
# Document Conversion
# ============================================================================
# Convert markdown templates to Word documents using Pandoc
word:
@echo "π Converting markdown templates to Word format..."
@echo " Converting: architecture-decision-record-template.md"
pandoc doc/design-authority/dhcw/architecture-decision-record-template.md --reference-doc=.github/workflows/markdown-to-word-styles.docx -o architecture-decision-record-template.docx
@echo " Converting: architecture-design-overview-template.md"
pandoc doc/design-authority/dhcw/architecture-design-overview-template.md --reference-doc=.github/workflows/markdown-to-word-styles.docx -o architecture-design-overview-template.docx
@echo "β
Word documents generated successfully!"
@echo " Output: architecture-decision-record-template.docx"
@echo " Output: architecture-design-overview-template.docx"
# =========================================================================
# Publishing Sync
# =========================================================================
# Run script to sync to the public repository clone (dry-run by default). Pass `-h` to show help.
sync-public *args:
uv run scripts/sync-public.py {{args}}