Skip to content

Commit

Permalink
test 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Joaquin Montes committed Jul 18, 2023
1 parent 6a9bd95 commit 2f56df8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/actions/validate-docs-links/lib/index.js

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions .github/actions/validate-docs-links/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ async function getAllMdxFilePaths(): Promise<string[]> {
const sidebarLearn = await fs.readFile('./config/sidebar-learn.json', 'utf8')
const sidebarReference = await fs.readFile('./config/sidebar-reference.json', 'utf8')
const footer: FooterConfigSchema = JSON.parse(await fs.readFile('./config/sidebar-footer.json', 'utf8'))
console.log('parsed config files')

const config: ConfigSchema = {...JSON.parse(sidebarLearn), ...JSON.parse(sidebarReference), ...footer.filter(item => 'source' in item)}
let paths: string[] = []
Expand Down Expand Up @@ -342,8 +343,9 @@ async function updateCheckStatus(

// Main function that triggers link validation across .mdx files
async function validateAllInternalLinks(): Promise<void> {
// try {
try {
const allMdxFilePaths = await getAllMdxFilePaths()
console.log('Validating links in the following files:', allMdxFilePaths)

documentMap = new Map(
await Promise.all(allMdxFilePaths.map(prepareDocumentMapEntry))
Expand Down Expand Up @@ -429,9 +431,9 @@ async function validateAllInternalLinks(): Promise<void> {
} catch (error) {
setFailed('Failed to create Github check: ' + error)
}
// } catch (error) {
// setFailed('Error validating internal links: ' + error)
// }
} catch (error) {
setFailed('Error validating internal links: ' + error)
}
}

validateAllInternalLinks()

0 comments on commit 2f56df8

Please sign in to comment.