fix links
- SHA
86f4d57f604be24fdeaa754ca21768213743b14c- Parents
-
2fe52d1 - Tree
d127965
86f4d57
86f4d57f604be24fdeaa754ca21768213743b14c2fe52d1
d127965| Status | File | + | - |
|---|---|---|---|
| M |
deploy.sh
|
17 | 2 |
| M |
index.html
|
4 | 6 |
deploy.shmodified@@ -13,20 +13,35 @@ STAGE="${STAGE_DIR:-$HOME/builds/$SITE/$STAMP}" | ||
| 13 | 13 | |
| 14 | 14 | # ── ensure dirs exist ─────────────────────────────────────────────────── |
| 15 | 15 | echo "▶ Ensure web root" |
| 16 | -sudo install -d -m 0755 "$RELEASES" | |
| 17 | 16 | sudo install -d -m 0755 "$WEB_ROOT" |
| 17 | +sudo install -d -m 0755 "$RELEASES" | |
| 18 | 18 | |
| 19 | 19 | # ── stage ─────────────────────────────────────────────────────────────── |
| 20 | 20 | echo "▶ Stage files → $STAGE" |
| 21 | 21 | mkdir -p "$STAGE" |
| 22 | +# Only ship the static site files we care about | |
| 22 | 23 | rsync -az --delete \ |
| 23 | - --exclude deploy.sh --exclude .git \ | |
| 24 | + --include '/index.html' \ | |
| 25 | + --include '/css/***' \ | |
| 26 | + --include '/js/***' \ | |
| 27 | + --exclude '*' \ | |
| 24 | 28 | "$PROJECT_DIR"/ "$STAGE"/ |
| 25 | 29 | |
| 30 | +echo "▶ Verify staged content" | |
| 31 | +ls -l "$STAGE" | |
| 32 | +test -f "$STAGE/index.html" || { echo "✗ index.html missing in stage"; exit 1; } | |
| 33 | +test -d "$STAGE/css" || { echo "✗ css/ missing in stage"; exit 1; } | |
| 34 | +test -d "$STAGE/js" || { echo "✗ js/ missing in stage"; exit 1; } | |
| 35 | + | |
| 26 | 36 | # ── publish ───────────────────────────────────────────────────────────── |
| 27 | 37 | echo "▶ Publish → $RELEASES/$STAMP" |
| 28 | 38 | sudo rsync -az --delete "$STAGE"/ "$RELEASES/$STAMP"/ |
| 29 | 39 | |
| 40 | +echo "▶ Verify release contents" | |
| 41 | +sudo test -f "$RELEASES/$STAMP/index.html" || { echo "✗ index.html missing in release"; exit 1; } | |
| 42 | +sudo test -d "$RELEASES/$STAMP/css" || { echo "✗ css/ missing in release"; exit 1; } | |
| 43 | +sudo test -d "$RELEASES/$STAMP/js" || { echo "✗ js/ missing in release"; exit 1; } | |
| 44 | + | |
| 30 | 45 | # ── flip symlink (with rollback trap) ─────────────────────────────────── |
| 31 | 46 | echo "▶ Flip symlink" |
| 32 | 47 | prev="$(readlink -f "$CURRENT" || true)" |
index.htmlmodified@@ -5,9 +5,7 @@ | ||
| 5 | 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 6 | 6 | <title>Cob :: Monch Fireflies</title> |
| 7 | 7 | <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.7.0/p5.min.js"></script> |
| 8 | - <style> | |
| 9 | - | |
| 10 | - </style> | |
| 8 | + <link rel="stylesheet" href="css/styles.css"> | |
| 11 | 9 | </head> |
| 12 | 10 | <body> |
| 13 | 11 | <div id="game-container"> |
@@ -25,8 +23,8 @@ | ||
| 25 | 23 | <div id="web-meter-fill"></div> |
| 26 | 24 | </div> |
| 27 | 25 | </div> |
| 28 | - <script src="physics.js"></script> | |
| 29 | - <script src="entities.js"></script> | |
| 30 | - <script src="game.js"></script> | |
| 26 | + <script src="js/physics.js"></script> | |
| 27 | + <script src="js/entities.js"></script> | |
| 28 | + <script src="js/game.js"></script> | |
| 31 | 29 | </body> |
| 32 | 30 | </html> |