File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,15 +9,13 @@ echo "[trickfire-docs] Build started at $(date)"
99
1010cd " $REPO_DIR "
1111
12- # Pull latest framework code (src/, scripts/, package.json, etc.)
13- # content/ is gitignored and managed by sync jobs — git pull won't touch it.
1412git pull --ff-only origin main
15-
16- # Install/update deps if the lock file changed
1713pnpm install --frozen-lockfile
18-
19- # Build Docusaurus site
2014pnpm website:build
2115
16+ sudo cp " $REPO_DIR /scripts/nginx.conf" /etc/nginx/sites-available/trickfire-docs
17+ sudo nginx -t
18+ sudo nginx -s reload
19+
2220echo " [trickfire-docs] Build complete at $( date) "
2321echo " [trickfire-docs] Output: $REPO_DIR /build/"
Original file line number Diff line number Diff line change 1- # TrickFire Robotics Docs — nginx config
2- # TLS is handled by the Cloudflare tunnel; nginx only listens on localhost.
3- #
4- # Copy to: /etc/nginx/sites-available/trickfire-docs
5- # Enable: ln -s /etc/nginx/sites-available/trickfire-docs /etc/nginx/sites-enabled/
6- # Test: nginx -t
7- # Reload: nginx -s reload
8-
91server {
102 listen 127.0.0.1:80 ;
113 server_name localhost;
124
135 root /home/trickfire/docs/build;
146 index index .html;
157
16- # Docusaurus SPA routing
178 location / {
18- try_files $uri $uri / $uri .html /index .html;
9+ try_files $uri $uri /index .html $uri .html /index .html;
1910 }
2011
21- # Immutable cache for content-hashed static assets
2212 location ~ * \.(js|css|woff2|woff|ttf|png|svg|ico)$ {
2313 expires 1y ;
2414 add_header Cache-Control "public, immutable" ;
2515 }
2616
27- # Short cache for HTML pages
2817 location ~ * \.html$ {
2918 expires 1h ;
3019 add_header Cache-Control "public, must-revalidate" ;
You can’t perform that action at this time.
0 commit comments