mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
ci: use defined ng-dev config for deploying docs site
Use the repo defined ng-dev configuration for deploying the docs site
This commit is contained in:
parent
7f8ffa3304
commit
eebcaf49f1
2 changed files with 5 additions and 18 deletions
10
.github/actions/deploy-docs-site/lib/main.mts
vendored
10
.github/actions/deploy-docs-site/lib/main.mts
vendored
|
|
@ -3,7 +3,7 @@ import {context} from '@actions/github';
|
|||
import {deployToFirebase, setupRedirect} from './deploy.mjs';
|
||||
import {getDeployments} from './deployments.mjs';
|
||||
import {generateSitemap} from './sitemap.mjs';
|
||||
import {AuthenticatedGitClient, GithubConfig, setConfig} from '@angular/ng-dev';
|
||||
import {assertValidGithubConfig, AuthenticatedGitClient, getConfig} from '@angular/ng-dev';
|
||||
import {githubReleaseTrainReadToken} from './credential.mjs';
|
||||
import {spawnSync} from 'child_process';
|
||||
import {cp, mkdtemp} from 'fs/promises';
|
||||
|
|
@ -13,13 +13,7 @@ import {join} from 'path';
|
|||
const refMatcher = /refs\/heads\/(.*)/;
|
||||
|
||||
async function deployDocs() {
|
||||
setConfig({
|
||||
github: {
|
||||
mainBranchName: 'main',
|
||||
name: 'angular',
|
||||
owner: 'angular',
|
||||
} as GithubConfig,
|
||||
});
|
||||
getConfig([assertValidGithubConfig]);
|
||||
|
||||
AuthenticatedGitClient.configure(githubReleaseTrainReadToken);
|
||||
|
||||
|
|
|
|||
13
.github/actions/deploy-docs-site/main.js
vendored
13
.github/actions/deploy-docs-site/main.js
vendored
|
|
@ -26834,7 +26834,7 @@ var YargsParser = class {
|
|||
}
|
||||
applyEnvVars(argv, true);
|
||||
applyEnvVars(argv, false);
|
||||
setConfig2(argv);
|
||||
setConfig(argv);
|
||||
setConfigObjects();
|
||||
applyDefaultsAndAliases(argv, flags.aliases, defaults, true);
|
||||
applyCoercions(argv);
|
||||
|
|
@ -27024,7 +27024,7 @@ var YargsParser = class {
|
|||
}
|
||||
return value;
|
||||
}
|
||||
function setConfig2(argv2) {
|
||||
function setConfig(argv2) {
|
||||
const configLookup = /* @__PURE__ */ Object.create(null);
|
||||
applyDefaultsAndAliases(configLookup, flags.aliases, defaults);
|
||||
Object.keys(flags.configs).forEach(function(configKey) {
|
||||
|
|
@ -31081,7 +31081,6 @@ function getCachedConfig() {
|
|||
//
|
||||
import { pathToFileURL } from "url";
|
||||
var CONFIG_FILE_PATH_MATCHER = ".ng-dev/config.mjs";
|
||||
var setConfig = setCachedConfig;
|
||||
async function getConfig(baseDirOrAssertions) {
|
||||
let cachedConfig2 = getCachedConfig();
|
||||
if (cachedConfig2 === null) {
|
||||
|
|
@ -35591,13 +35590,7 @@ import { tmpdir as tmpdir2 } from "os";
|
|||
import { join as join5 } from "path";
|
||||
var refMatcher = /refs\/heads\/(.*)/;
|
||||
async function deployDocs() {
|
||||
setConfig({
|
||||
github: {
|
||||
mainBranchName: "main",
|
||||
name: "angular",
|
||||
owner: "angular"
|
||||
}
|
||||
});
|
||||
getConfig([assertValidGithubConfig]);
|
||||
AuthenticatedGitClient.configure(githubReleaseTrainReadToken);
|
||||
if (import_github3.context.eventName !== "push") {
|
||||
throw Error();
|
||||
|
|
|
|||
Loading…
Reference in a new issue