From d354bd1e840e7c9a8b094151e9e12adaf82e8fe4 Mon Sep 17 00:00:00 2001 From: Denis Strigo Date: Tue, 24 Sep 2024 18:32:04 +0200 Subject: [PATCH] fix(demo-build): fix demo dosc deployments (#6043) --- README.md | 6 +++--- docs/main.ts | 1 - scripts/docs/build-docs.ts | 4 ++-- scripts/docs/config.ts | 1 + 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 43cb44de..1819c072 100644 --- a/README.md +++ b/README.md @@ -46,15 +46,15 @@ To use material theme checkout `feat/material-theme` branch. ### With 6 stunning visual themes -| | | +| | | | --- | --- | | Material Dark | Material Light | -| | | +| | | | --- | --- | | Dark| Default | -| | | +| | | | --- | --- | | Cosmic | Corporate | diff --git a/docs/main.ts b/docs/main.ts index 11f9f131..e2b5bd9a 100644 --- a/docs/main.ts +++ b/docs/main.ts @@ -15,4 +15,3 @@ if (environment.production) { } platformBrowserDynamic().bootstrapModule(AppModule); - diff --git a/scripts/docs/build-docs.ts b/scripts/docs/build-docs.ts index 3562e1b4..79f1b037 100644 --- a/scripts/docs/build-docs.ts +++ b/scripts/docs/build-docs.ts @@ -5,7 +5,7 @@ import { generateGithubSpaScript } from './ghspa-template'; import { runCommand } from './run-command'; import { log } from './log'; -import { REPO_URL, OUT_DIR, REPO_OWNER, REPO_NAME } from './config'; +import { REPO_URL, OUT_DIR, REPO_OWNER, REPO_NAME, GH_PAT } from './config'; const WORK_DIR = join(process.cwd(), '../_DOCS_BUILD_WORK_DIR_'); const MASTER_BRANCH_DIR = join(WORK_DIR, 'MASTER'); const DOCS_VERSIONS_PATH = join(MASTER_BRANCH_DIR, 'docs/versions.json'); @@ -117,7 +117,7 @@ async function buildDocsApp(projectDir: string, baseHref: string) { async function deploy(distDir: string) { await runCommand( - `npx angular-cli-ghpages -S --dir . --repo=https://github.com/${REPO_OWNER}/${REPO_NAME}.git`, + `npx angular-cli-ghpages -S --dir . --repo=https://${GH_PAT}@github.com/${REPO_OWNER}/${REPO_NAME}.git`, { cwd: distDir, showLog: true }, ); } diff --git a/scripts/docs/config.ts b/scripts/docs/config.ts index 92498fc5..5bbebeb8 100644 --- a/scripts/docs/config.ts +++ b/scripts/docs/config.ts @@ -2,3 +2,4 @@ export const REPO_URL = 'https://github.com/akveo/ngx-admin.git'; export const REPO_OWNER = 'akveo'; export const REPO_NAME = 'ngx-admin'; export const OUT_DIR = 'docs/dist'; // Relative to the directory you run command +export const GH_PAT = process.env.GH_PAT || ''; // Relative to the directory you run command