docs-site/repo-homepage
Keeps a repository’s GitHub homepage pointing at its documentation site.
The URL is the site’s own (site + base of its Astro configuration), so nothing here knows which origin or account a site belongs to. It reads and writes through the gh CLI with whatever credentials it already has.
A workflow’s GITHUB_TOKEN cannot change a repository’s settings, so in CI a mismatch is reported, never fixed: the report prints the gh repo edit line that fixes it. Nothing here ever fails a build.
Interfaces
Section titled “Interfaces”| Interface | Description |
|---|---|
| SyncRepoHomepageParams | Params for syncRepoHomepage. |
Functions
Section titled “Functions”| Function | Description |
|---|---|
| syncRepoHomepage | Compares a repository’s GitHub homepage with its site’s URL, and sets it or reports the mismatch. It only warns: an unreadable repository, a mismatch it may not fix and a failed update each print the reason and the gh repo edit line, and inside GitHub Actions also a ::warning:: annotation. |
| Type | Description |
|---|---|
| RepoHomepageMode | What a site build does about its repository’s GitHub homepage. - off: nothing. - check: report a homepage that is not the site’s URL, with the command that sets it. - set: set a homepage that is not the site’s URL, and report it when the credentials cannot. |