Skip to content

Commit 7ea5cf7

Browse files
committed
fix: script and update deps ci
1 parent 7ed8289 commit 7ea5cf7

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/update-dependencies.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Update Dependencies
22

3+
permissions:
4+
contents: write
5+
pull-requests: write
6+
37
on:
48
schedule:
59
# Run every Monday at 9:00 AM UTC

docs/scripts/copy-evolution-docs.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ async function copyFile(src: string, dest: string) {
3030
await fs.writeFile(dest, convertedContent)
3131
console.log(`Copied: ${path.relative(process.cwd(), src)}${path.relative(process.cwd(), dest)}`)
3232
} catch (error) {
33-
console.error(`Error copying ${src} to ${dest}: ${error.message}`)
33+
console.error(`Error copying ${src} to ${dest}: ${(error as Error).message}`)
3434
throw error
3535
}
3636
}
@@ -67,7 +67,7 @@ async function copyDirectory(source: string, target: string) {
6767
async function createMetaJson(directory: string) {
6868
try {
6969
const entries = await fs.readdir(directory)
70-
const metaEntries = {}
70+
const metaEntries: Record<string, string> = {}
7171

7272
// Filter only the .mdx files (converted from .md)
7373
const mdxFiles = entries.filter((entry) => entry.endsWith(".mdx") && entry !== "index.mdx")
@@ -85,7 +85,7 @@ async function createMetaJson(directory: string) {
8585

8686
console.log(`Created _meta.json in ${path.relative(process.cwd(), directory)}`)
8787
} catch (error) {
88-
console.error(`Error creating _meta.json: ${error.message}`)
88+
console.error(`Error creating _meta.json: ${(error as Error).message}`)
8989
}
9090
}
9191

@@ -109,7 +109,7 @@ async function main() {
109109

110110
console.log("Documentation copy completed successfully!")
111111
} catch (error) {
112-
console.error("Error copying documentation:", error.message)
112+
console.error("Error copying documentation:", (error as Error).message)
113113
process.exit(1)
114114
}
115115
}

0 commit comments

Comments
 (0)