import { SimpleGit } from 'simple-git'; import { PublishOptions } from 'gh-pages'; import { SiteConfig } from './SiteConfig.js'; export type DeployOptions = { branch: string; message: string; repo: string; remote: string; user?: { name: string; email: string; }; }; export type DeployResult = { ghPagesUrl: string | null; ghActionsUrl: string | null; }; type ParsedGitHubRepo = { owner: string; repoName: string; }; /** * Handles the deployment of the generated site to GitHub Pages or other configured remote repositories. */ export declare class SiteDeployManager { rootPath: string; outputPath: string; siteConfig: SiteConfig; constructor(rootPath: string, outputPath: string); deploy(ciTokenVar: string | boolean): Promise; /** * Helper function for deploy(). Returns the deployment URLs (GitHub Pages and GitHub Actions). */ generateDepUrl(ciTokenVar: boolean | string, defaultDeployConfig: DeployOptions): Promise; /** * Helper function for deploy(). Set the options needed to be used by ghpages.publish. */ getDepOptions(ciTokenVar: boolean | string, defaultDeployConfig: DeployOptions, publish: (basePath: string, options: PublishOptions) => Promise): Promise; static isAuthError(errMessage: string): boolean; static throwIfAuthError(err: unknown, usingDefaultGithubToken: boolean): void; static warnCrossRepoToken(repoSlug: string | undefined, currentRepo: string | undefined): void; /** * Extract repo slug from user-specified repo URL so that we can include the access token */ static extractRepoSlug(repo: string, ciRepoSlug: string | undefined): string | undefined; /** * Helper function for deploy(). */ static getDepUrl(options: DeployOptions): Promise; /** * Parses a GitHub remote URL (HTTPS or SSH) and extracts the owner name and repo name. * Returns null if the URL format is not recognized. */ static parseGitHubRemoteUrl(remoteUrl: string): ParsedGitHubRepo | null; /** * Constructs the GitHub Pages URL from a parsed remote URL. * Returns a URL in the format: https://.github.io/ */ static constructGhPagesUrl(repo: ParsedGitHubRepo): string; /** * Constructs the GitHub Actions URL from a remote URL. * Returns a URL in the format: https://github.com///actions */ static constructGhActionsUrl(repo: ParsedGitHubRepo): string; /** * Gets the deployed website's url and GitHub Actions url, * returning null for either if there was an error retrieving it. */ static getDeploymentUrl(git: SimpleGit, options: DeployOptions): Promise; } export {}; //# sourceMappingURL=SiteDeployManager.d.ts.map