Skip to content

Commit 81b60e2

Browse files
committed
Corrected CI workflow
1 parent b689e25 commit 81b60e2

File tree

4 files changed

+24
-25
lines changed

4 files changed

+24
-25
lines changed
Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
1+
# .github/workflows/deploy-audit-netlify.yml
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+
17
name: Deploy Audit to Netlify
28

39
on:
410
push:
511
branches:
612
- audit-netlify
713

14+
permissions:
15+
contents: read
16+
817
jobs:
918
deploy:
1019
runs-on: ubuntu-24.04
1120
env:
12-
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_AUDIT_SITE_ID }}
13-
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
1421
ENV_MODE: audit
1522
PUBLIC_ENV_MODE: audit
1623

@@ -19,22 +26,12 @@ jobs:
1926

2027
- uses: actions/setup-node@v6
2128
with:
22-
node-version: 24
29+
node-version: 22
2330
cache: npm
2431
cache-dependency-path: package-lock.json
2532

2633
- name: Install Dependencies
2734
run: npm ci
2835

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
36+
- name: Build in Audit Mode
37+
run: npm run build:audit

.stylelintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
# SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
55
# This file is part of Network Pro.
66

7+
# Netlify
8+
.netlify
9+
710
# Report files and test results
811
playwright-report
912
test-results

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"lint:fix": "eslint . --ext .js,.cjs,.mjs,.svelte --fix",
7171
"lint:jsdoc": "eslint . --ext .js,.cjs,.mjs,.svelte --max-warnings=0",
7272
"lint:css": "stylelint \"**/*.{css,svelte}\" --ignore-path .stylelintignore",
73-
"lint:md": "npx markdownlint-cli2 \"**/*.{md,markdown}\" \"#node_modules/**\" \"#playwright-report/**\" \"#test-results/**\"",
73+
"lint:md": "npx markdownlint-cli2 \"**/*.{md,markdown}\" \"#build/**\" \"#.netlify/**\" \"#node_modules/**\" \"#playwright-report/**\" \"#test-results/**\"",
7474
"format": "prettier --check .",
7575
"format:fix": "prettier --write .",
7676
"lint:all": "npm-run-all --parallel --print-label lint lint:md lint:css --sequential format",

src/routes/__audit/headers/+server.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,17 @@ This file is part of Network Pro.
1717
*/
1818

1919
/**
20-
* @param {import('@sveltejs/kit').RequestEvent} _event - Unused request event
21-
* @returns {Response} - A 204 response with environment-specific headers
20+
* @param {import('@sveltejs/kit').RequestEvent} _event
21+
* @returns {Response}
2222
*/
2323
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-
3024
return new Response(null, {
3125
status: 204,
32-
headers,
26+
headers: {
27+
'X-Env': process.env.NODE_ENV ?? 'undefined',
28+
'X-Mode': process.env.ENV_MODE ?? 'unset',
29+
'X-Public-Mode': process.env.PUBLIC_ENV_MODE ?? 'unset',
30+
'X-Check': 'audit-path-active'
31+
}
3332
});
3433
}

0 commit comments

Comments
 (0)