CoolFace
Apppublic

lerobot/robot-learning-tutorial

sourceHugging Faceupdated 11mo agoView on Hugging Face
506likes
entrypoint.sh43 linesDownload Raw Back to root
1#!/bin/bash2set -e3 4echo "๐Ÿš€ Starting Hugging Face Space..."5 6# Check if Notion import is enabled and token is available7if [ "${ENABLE_NOTION_IMPORT:-false}" = "true" ] && [ -n "$NOTION_TOKEN" ] && [ -n "$NOTION_PAGE_ID" ]; then8    echo "๐Ÿ”„ Notion import enabled - fetching content from Notion..."9    echo "   Page ID: $NOTION_PAGE_ID"10    11    cd /app12    13    # Run notion import14    if npm run notion:import 2>&1; then15        echo "โœ… Notion import completed successfully!"16        17        # Rebuild the site with new content18        echo "๐Ÿ”จ Rebuilding site with Notion content..."19        npm run build 2>&120        21        # Generate PDF22        echo "๐Ÿ“„ Generating PDF..."23        npm run export:pdf -- --theme=light --wait=full 2>&1 || echo "โš ๏ธ  PDF generation failed (non-critical)"24        25        echo "โœ… Site rebuilt and ready!"26    else27        echo "โš ๏ธ  Notion import failed - using pre-built content from build time"28    fi29else30    if [ "${ENABLE_NOTION_IMPORT:-false}" = "true" ]; then31        echo "โš ๏ธ  Notion import enabled but NOTION_TOKEN or NOTION_PAGE_ID not found"32        echo "   NOTION_TOKEN: ${NOTION_TOKEN:+SET}${NOTION_TOKEN:-NOT SET}"33        echo "   NOTION_PAGE_ID: ${NOTION_PAGE_ID:+SET}${NOTION_PAGE_ID:-NOT SET}"34        echo "   โ†’ Using pre-built content from build time"35    else36        echo "โญ๏ธ  Notion import disabled - using pre-built content from build time"37    fi38fi39 40# Start nginx41echo "๐ŸŒ Starting nginx on port 8080..."42exec nginx -g 'daemon off;'43