diff --git a/scripts/docs-deploy/github-versioning.ts b/scripts/docs-deploy/github-versioning.ts index c9cf59e992c4..809c25fea5da 100644 --- a/scripts/docs-deploy/github-versioning.ts +++ b/scripts/docs-deploy/github-versioning.ts @@ -7,10 +7,12 @@ import { getNextBranchName, } from '@angular/dev-infra-private/ng-dev'; +import {githubAccessToken} from './utils'; + export function getReleaseRepoWithApi(): ReleaseRepoWithApi { const githubClient = - process.env.GITHUB_TOKEN !== undefined - ? new AuthenticatedGithubClient(process.env.GITHUB_TOKEN) + githubAccessToken !== undefined + ? new AuthenticatedGithubClient(githubAccessToken) : new GithubClient(); const {github} = getConfig([assertValidGithubConfig]); diff --git a/scripts/docs-deploy/utils.ts b/scripts/docs-deploy/utils.ts index 51760025b03d..f1255aaf069e 100644 --- a/scripts/docs-deploy/utils.ts +++ b/scripts/docs-deploy/utils.ts @@ -23,6 +23,9 @@ export const sites = { new SiteTarget(`v${major}-material-angular-io`, `https://v${major}.material.angular.io`), }; +/** Optional Github access token. Can be used for querying the active release trains. */ +export const githubAccessToken: string | undefined = process.env.DOCS_DEPLOY_GITHUB_TOKEN; + /** Configuration describing the Firebase project that we deploy to. */ export const firebaseConfig = { projectId: 'material-angular-io',