|
4 | 4 | * Automatically discovers and generates infrastructure provider pages from the llm-d repository. |
5 | 5 | * This syncs provider-specific documentation for deploying llm-d on different infrastructure. |
6 | 6 | * |
7 | | - * Infra provider docs are synced from the specific release version defined in components-data.yaml, |
8 | | - * not from the main branch. This ensures documentation matches the released version. |
| 7 | + * Infra provider docs are synced from the main branch to always show the latest development content. |
9 | 8 | */ |
10 | 9 |
|
11 | 10 | import { createContentWithSource } from '../utils.js'; |
12 | | -import { findRepoConfig, RELEASE_INFO } from '../component-configs.js'; |
| 11 | +import { findRepoConfig, generateRepoUrls } from '../component-configs.js'; |
13 | 12 | import { getRepoTransform } from '../repo-transforms.js'; |
14 | 13 |
|
15 | 14 | // Get repository configuration for the main llm-d repo |
16 | 15 | const repoConfig = findRepoConfig('llm-d'); |
| 16 | +const { repoUrl, sourceBaseUrl, ref } = generateRepoUrls(repoConfig); |
17 | 17 |
|
18 | | -// Use the release version from YAML instead of the branch |
19 | | -const releaseVersion = RELEASE_INFO.version; |
20 | | -const repoUrl = `https://github.com/${repoConfig.org}/${repoConfig.name}`; |
21 | | -const sourceBaseUrl = `https://raw.githubusercontent.com/${repoConfig.org}/${repoConfig.name}/${releaseVersion}/`; |
22 | | - |
23 | | -// Create a custom transform that uses the release version instead of 'main' |
| 18 | +// Create a content transform using main branch |
24 | 19 | const transform = getRepoTransform(repoConfig.org, repoConfig.name); |
25 | 20 | const contentTransform = (content, sourcePath) => transform(content, { |
26 | 21 | repoUrl, |
27 | | - branch: releaseVersion, // Use release version, not 'main' |
| 22 | + branch: ref, // Always 'main' |
28 | 23 | org: repoConfig.org, |
29 | 24 | name: repoConfig.name, |
30 | 25 | sourcePath |
@@ -86,7 +81,7 @@ function createInfraProviderPlugins() { |
86 | 81 | filename: sourceFile, |
87 | 82 | newFilename: `${provider.dirName}.md`, |
88 | 83 | repoUrl, |
89 | | - branch: releaseVersion, |
| 84 | + branch: ref, // Always 'main' |
90 | 85 | content, |
91 | 86 | contentTransform |
92 | 87 | }); |
|
0 commit comments