zeroed-some/cob / 86f4d57

Browse files

fix links

Authored by espadonne
SHA
86f4d57f604be24fdeaa754ca21768213743b14c
Parents
2fe52d1
Tree
d127965

2 changed files

StatusFile+-
M deploy.sh 17 2
M index.html 4 6
deploy.shmodified
@@ -13,20 +13,35 @@ STAGE="${STAGE_DIR:-$HOME/builds/$SITE/$STAMP}"
1313
 
1414
 # ── ensure dirs exist ───────────────────────────────────────────────────
1515
 echo "▶ Ensure web root"
16
-sudo install -d -m 0755 "$RELEASES"
1716
 sudo install -d -m 0755 "$WEB_ROOT"
17
+sudo install -d -m 0755 "$RELEASES"
1818
 
1919
 # ── stage ───────────────────────────────────────────────────────────────
2020
 echo "▶ Stage files → $STAGE"
2121
 mkdir -p "$STAGE"
22
+# Only ship the static site files we care about
2223
 rsync -az --delete \
23
-  --exclude deploy.sh --exclude .git \
24
+  --include '/index.html' \
25
+  --include '/css/***' \
26
+  --include '/js/***' \
27
+  --exclude '*' \
2428
   "$PROJECT_DIR"/ "$STAGE"/
2529
 
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
+
2636
 # ── publish ─────────────────────────────────────────────────────────────
2737
 echo "▶ Publish → $RELEASES/$STAMP"
2838
 sudo rsync -az --delete "$STAGE"/ "$RELEASES/$STAMP"/
2939
 
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
+
3045
 # ── flip symlink (with rollback trap) ───────────────────────────────────
3146
 echo "▶ Flip symlink"
3247
 prev="$(readlink -f "$CURRENT" || true)"
index.htmlmodified
@@ -5,9 +5,7 @@
55
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
66
     <title>Cob :: Monch Fireflies</title>
77
     <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">
119
 </head>
1210
 <body>
1311
     <div id="game-container">
@@ -25,8 +23,8 @@
2523
             <div id="web-meter-fill"></div>
2624
         </div>
2725
     </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>
3129
 </body>
3230
 </html>