feat(kits): add dev preview announcement banner

This commit is contained in:
Vijay Janapa Reddi
2025-12-30 22:29:23 -05:00
parent a446a71202
commit 63a7984c87
3 changed files with 32 additions and 0 deletions

View File

@@ -68,6 +68,18 @@ jobs:
echo "📦 Downloads folder contents:"
ls -la kits/_build/assets/downloads/ || echo "No downloads folder"
- name: 🔧 Modify announcement for dev preview
run: |
echo "🔧 Modifying announcement banner for development preview..."
COMMIT_SHORT="${{ github.sha }}"
COMMIT_SHORT="${COMMIT_SHORT:0:8}"
python3 book/tools/scripts/publish/modify_dev_announcement.py \
kits/_build \
--verbose \
--commit-hash "${{ github.sha }}" \
--commit-short "$COMMIT_SHORT"
- name: 🚀 Deploy to Dev Site via SSH
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}

View File

@@ -207,3 +207,7 @@ format:
include-after-body:
- text: |
<script src="assets/scripts/subscribe-modal.js" defer></script>
# Announcement bar configuration
metadata-files:
- config/announcement.yml

View File

@@ -0,0 +1,16 @@
# =============================================================================
# ANNOUNCEMENT BAR CONFIGURATION - HARDWARE KITS
# =============================================================================
# This file contains the announcement bar configuration for the kits site.
# It's included via metadata-files in _quarto-html.yml
# =============================================================================
website:
announcement:
icon: megaphone
dismissable: true
type: primary
position: below-navbar
content: |
📦 **Hardware Kits:** Hands-on ML labs for Arduino, Seeed & Raspberry Pi. [Get started →](/contents/getting-started.html)<br>
📚 **Textbook:** Read the ML Systems book. [Explore →](https://mlsysbook.ai/book)