mirror of
https://github.com/SukkaW/Surge.git
synced 2026-07-30 02:31:45 +08:00
CI: Housekeeping & nojekyll
This commit is contained in:
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@@ -159,7 +159,7 @@ jobs:
|
|||||||
id: npm_cache_path
|
id: npm_cache_path
|
||||||
shell: sh
|
shell: sh
|
||||||
run: echo dir=$(npm config get cache) >> $GITHUB_OUTPUT
|
run: echo dir=$(npm config get cache) >> $GITHUB_OUTPUT
|
||||||
- uses: actions/cache@v5
|
- uses: actions/cache@v6
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
${{ steps.npm_cache_path.outputs.dir }}
|
${{ steps.npm_cache_path.outputs.dir }}
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ export const buildPublic = task(require.main === module, __filename)(async (span
|
|||||||
.traceChild('generate index.html')
|
.traceChild('generate index.html')
|
||||||
.traceAsyncFn(() => treeDir(PUBLIC_DIR).then(generateHtml));
|
.traceAsyncFn(() => treeDir(PUBLIC_DIR).then(generateHtml));
|
||||||
|
|
||||||
await Promise.all([
|
return Promise.all([
|
||||||
compareAndWriteFile(
|
compareAndWriteFile(
|
||||||
span,
|
span,
|
||||||
appendArrayInPlace(
|
appendArrayInPlace(
|
||||||
@@ -104,10 +104,10 @@ export const buildPublic = task(require.main === module, __filename)(async (span
|
|||||||
''
|
''
|
||||||
],
|
],
|
||||||
path.join(PUBLIC_DIR, 'README.md')
|
path.join(PUBLIC_DIR, 'README.md')
|
||||||
)
|
),
|
||||||
|
writeFile(path.join(PUBLIC_DIR, '.nojekyll'), ''),
|
||||||
|
writeFile(path.join(PUBLIC_DIR, 'index.html'), html)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return writeFile(path.join(PUBLIC_DIR, 'index.html'), html);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const prioritySorter = (a: TreeType, b: TreeType) => ((priorityOrder[a.name] || priorityOrder.default) - (priorityOrder[b.name] || priorityOrder.default)) || fastStringCompare(a.name, b.name);
|
const prioritySorter = (a: TreeType, b: TreeType) => ((priorityOrder[a.name] || priorityOrder.default) - (priorityOrder[b.name] || priorityOrder.default)) || fastStringCompare(a.name, b.name);
|
||||||
|
|||||||
Reference in New Issue
Block a user