Skip to content

Commit 6ecf9d0

Browse files
committed
chore: due to generated fil removed from git index, the issue came back... copy in workflow instead
1 parent 2f16ced commit 6ecf9d0

4 files changed

Lines changed: 28 additions & 3 deletions

File tree

.github/workflows/ci-pipeline.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,12 @@ jobs:
3737
- name: 📦 Install dependencies
3838
run: npm ci
3939
working-directory: Website
40-
- name: 🔨 Build
41-
run: npm run build
40+
- name: 🗃️ Move stub data
41+
run: npm run prepipeline
4242
working-directory: Website
4343
- name: 📝 Lint
4444
run: npm run lint
4545
working-directory: Website
46+
- name: 🔨 Build
47+
run: npm run build
48+
working-directory: Website

Website/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"dev": "next dev",
77
"build": "next build",
88
"start": "next start",
9-
"lint": "next lint"
9+
"lint": "next lint",
10+
"prepipeline": "node scripts/copyStub.js"
1011
},
1112
"dependencies": {
1213
"@radix-ui/react-collapsible": "^1.1.1",

Website/scripts/copyStub.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
const fs = require('fs');
2+
const path = require('path');
3+
4+
const source = path.resolve(__dirname, '../stubs/Data.ts');
5+
const destination = path.resolve(__dirname, '../generated/Data.ts');
6+
7+
fs.mkdirSync(path.dirname(destination), { recursive: true });
8+
fs.copyFileSync(source, destination);
9+
10+
console.log(`Stub Data.ts copied to ${destination}`);

Website/stubs/Data.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/// Used in github workflow to generate stubs for data
2+
/// This file is a stub and should not be modified directly.
3+
4+
import { GroupType } from "@/lib/Types";
5+
6+
export let Groups: GroupType[] = [
7+
{
8+
"Name":"Untitled",
9+
"Entities":[]
10+
}
11+
];

0 commit comments

Comments
 (0)