File tree Expand file tree Collapse file tree 10 files changed +143
-20
lines changed
Expand file tree Collapse file tree 10 files changed +143
-20
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy Audit to Netlify
2+
3+ on :
4+ push :
5+ branches :
6+ - audit-netlify
7+
8+ jobs :
9+ deploy :
10+ runs-on : ubuntu-24.04
11+ env :
12+ NETLIFY_SITE_ID : ${{ secrets.NETLIFY_AUDIT_SITE_ID }}
13+ NETLIFY_AUTH_TOKEN : ${{ secrets.NETLIFY_AUTH_TOKEN }}
14+ ENV_MODE : audit
15+ PUBLIC_ENV_MODE : audit
16+
17+ steps :
18+ - uses : actions/checkout@v5
19+
20+ - uses : actions/setup-node@v6
21+ with :
22+ node-version : 24
23+ cache : npm
24+ cache-dependency-path : package-lock.json
25+
26+ - name : Install Dependencies
27+ run : npm ci
28+
29+ - name : Build with Audit Mode
30+ run : |
31+ npx vite build --mode audit
32+ npx svelte-kit build --mode audit
33+
34+ - name : Deploy to Netlify
35+ run : |
36+ npx netlify deploy \
37+ --prod \
38+ --site=$NETLIFY_SITE_ID \
39+ --auth=$NETLIFY_AUTH_TOKEN \
40+ --dir=.svelte-kit/output
Original file line number Diff line number Diff line change 1+ /*
2+ X-Frame-Options: DENY
3+ X-Content-Type-Options: nosniff
4+ Referrer-Policy: strict-origin-when-cross-origin
5+ Permissions-Policy: interest-cohort=()
Original file line number Diff line number Diff line change 1+ /robots.txt /robots-audit.txt 200
Original file line number Diff line number Diff line change 1+ # netlify.toml
2+ #
3+ # Copyright © 2025 Network Pro Strategies (Network Pro™)
4+ # SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
5+ # This file is part of Network Pro
6+
7+ # ============================================================================
8+ # Audit Deployment (SSR, via Netlify Functions)
9+ # ============================================================================
10+ # This config is used *only* in the audit-netlify branch.
11+ # The site is built using adapter-netlify, with SSR enabled.
12+ # ============================================================================
13+
14+ [build ]
15+ command = " npm run build"
16+ publish = " build"
17+
18+ # Enable SvelteKit SSR via Netlify Functions
19+ [functions ]
20+ node_bundler = " esbuild"
Original file line number Diff line number Diff line change 9494 "@eslint/js" : " ^9.39.1" ,
9595 "@lhci/cli" : " ^0.15.1" ,
9696 "@playwright/test" : " ^1.56.1" ,
97+ "@sveltejs/adapter-netlify" : " ^5.2.4" ,
9798 "@sveltejs/adapter-vercel" : " ^6.1.1" ,
9899 "@sveltejs/kit" : " 2.48.4" ,
99100 "@sveltejs/vite-plugin-svelte" : " ^6.2.1" ,
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ git checkout audit-netlify
3+ git pull origin audit-netlify
4+ git merge master --no-edit
5+ git push origin audit-netlify
Original file line number Diff line number Diff line change 1+ /* ==========================================================================
2+ src/routes/__audit/headers/+server.js
3+
4+ Copyright © 2025 Network Pro Strategies (Network Pro™)
5+ SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
6+ This file is part of Network Pro.
7+ ========================================================================== */
8+
9+ /**
10+ * @file +server.js
11+ * @description Audit header debug endpoint.
12+ * This route is used to verify runtime header behavior in the audit environment.
13+ * It returns a 204 No Content response with diagnostic headers.
14+ * @module src/routes/__audit/headers
15+ * @author Scott Lopez
16+ * @updated 2025-11-11
17+ */
18+
19+ /**
20+ * @param {import('@sveltejs/kit').RequestEvent } _event - Unused request event
21+ * @returns {Response } - A 204 response with environment-specific headers
22+ */
23+ export function GET ( _event ) {
24+ /** @type {HeadersInit } */
25+ const headers = {
26+ 'X-Env' : process . env . NODE_ENV ?? 'undefined' ,
27+ 'X-Check' : 'audit-path-active' ,
28+ } ;
29+
30+ return new Response ( null , {
31+ status : 204 ,
32+ headers,
33+ } ) ;
34+ }
Original file line number Diff line number Diff line change 1+ # robots-audit.txt
2+ #
3+ # Copyright © 2025 Network Pro Strategies (Network Pro™)
4+ # SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
5+ # This file is part of Network Pro
6+ #
7+ # www.robotstxt.org
8+
9+ User-agent: *
10+
11+ Disallow: /
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
66This file is part of Network Pro.
77========================================================================= */
88
9- import adapter from '@sveltejs/adapter-vercel ' ; // Vercel adapter for deployment
9+ import adapter from '@sveltejs/adapter-netlify ' ; // Netlify adapter for audit deployment
1010import { vitePreprocess } from '@sveltejs/vite-plugin-svelte' ; // Vite preprocessor for Svelte
1111
1212/** @type {import('@sveltejs/kit').Config } */
@@ -15,10 +15,8 @@ const config = {
1515 preprocess : vitePreprocess ( { postcss : true } ) ,
1616
1717 kit : {
18- // Vercel adapter configuration
19- adapter : adapter ( {
20- runtime : 'nodejs22.x' ,
21- } ) ,
18+ // Netlify adapter configuration (no runtime option needed)
19+ adapter : adapter ( ) ,
2220
2321 // Paths configuration for deployment
2422 paths : {
You can’t perform that action at this time.
0 commit comments