Skip to content

Commit 6d49562

Browse files
committed
remove unwanted settings
1 parent a539212 commit 6d49562

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

Dockerfile

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,6 @@ RUN npm ci
1717

1818
COPY . /app/
1919

20-
RUN if [ ! -d .git ]; then \
21-
git init && \
22-
git config user.email "ci@liara.ir" && \
23-
git config user.name "Liara CI" && \
24-
git add . && \
25-
git commit -m "Initial commit for build"; \
26-
fi
27-
2820
RUN npm run build
2921

3022
# 2) Run

mdx-to-md-converter/src/index.ts

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,24 @@ function getChangedMdxFiles(srcPagesPath: string): string[] {
5454
return findMdxFiles(srcPagesPath);
5555
}
5656

57+
const outputDir = path.join(process.cwd(), '..', 'public', 'llms');
58+
const hasExistingOutput = fs.existsSync(outputDir) &&
59+
fs.readdirSync(outputDir).length > 0;
60+
61+
if (!hasExistingOutput) {
62+
console.log('No existing output detected, processing all files (fresh build)');
63+
return findMdxFiles(srcPagesPath);
64+
}
65+
66+
console.log('Existing output detected, attempting git change detection');
67+
5768
let gitCommand = 'git diff --name-only HEAD~1';
5869

5970
try {
6071
execSync('git rev-parse HEAD~1', { stdio: 'ignore' });
6172
} catch {
62-
console.log('No previous commit found, getting all tracked files');
63-
gitCommand = 'git ls-files';
73+
console.log('No previous commit found, processing all files');
74+
return findMdxFiles(srcPagesPath);
6475
}
6576

6677
const changedFiles = execSync(gitCommand, { encoding: 'utf-8' })
@@ -72,11 +83,8 @@ function getChangedMdxFiles(srcPagesPath: string): string[] {
7283
console.log(`Git detected ${changedFiles.length} changed MDX files`);
7384

7485
if (changedFiles.length === 0) {
75-
const allFiles = findMdxFiles(srcPagesPath);
76-
if (allFiles.length > 0) {
77-
console.log('No changed files detected but MDX files exist, processing all files as fallback');
78-
return allFiles;
79-
}
86+
console.log('No changed files detected, skipping processing');
87+
return [];
8088
}
8189

8290
return changedFiles;

0 commit comments

Comments
 (0)