Skip to content

Commit 339a6b3

Browse files
committed
Auto-update: nav, content, or metadata
1 parent 6044480 commit 339a6b3

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
pip install mkdocs-material pyyaml
2727
2828
- name: Build MkDocs site (to verify)
29-
run: mkdocs build --strict
29+
run: mkdocs build
3030

3131
- name: Create CNAME file
3232
run: echo "tep.cyberpax.cloud" > docs/CNAME

generate_nav.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
IGNORE_DIRS = {"stylesheets", "__pycache__", "images"}
77
IGNORE_FILES = {"_Sidebar.md", "index.md"}
88

9-
# Custom top-level order
9+
# Priority nav order (custom)
1010
PRIORITY_ORDER = [
1111
"Defender for Endpoint",
1212
"Support Tips and Tools",
@@ -56,26 +56,24 @@ def build_mkdocs_config(nav):
5656
with open(config_path, "w", encoding="utf-8") as f:
5757
yaml.dump(config, f, sort_keys=False, allow_unicode=True)
5858

59-
print("✅ Navigation updated in mkdocs.yml")
59+
print("✅ mkdocs.yml navigation updated.")
6060

6161
def git_commit_and_push():
62-
# Check for any changes (staged or not)
62+
# Check if anything changed
6363
result = subprocess.run(["git", "status", "--porcelain"], capture_output=True, text=True)
6464
if result.stdout.strip() == "":
6565
print("⚠️ No changes to commit.")
6666
return
6767

68-
print("📦 Staging and committing changes...")
68+
print("📦 Committing and pushing changes...")
6969
subprocess.run(["git", "add", "."], check=True)
70-
subprocess.run(["git", "commit", "-m", "Auto-update nav and content"], check=False)
70+
subprocess.run(["git", "commit", "-m", "Auto-update: nav, content, or metadata"], check=False)
7171
subprocess.run(["git", "push", "origin", "main"], check=True)
72-
print("✅ Git commit and push completed.")
72+
print("✅ Changes pushed to main. GitHub Pages will redeploy shortly.")
7373

7474
if __name__ == "__main__":
75-
print("📁 Collecting docs...")
75+
print("📁 Collecting docs and rebuilding nav...")
7676
nav = collect_docs(DOCS_DIR)
7777

78-
print("🧭 Building mkdocs.yml...")
7978
build_mkdocs_config(nav)
80-
8179
git_commit_and_push()

0 commit comments

Comments
 (0)