mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 08:37:22 +00:00
Shakespeare deploy uses "host" not "baseURL"
This commit is contained in:
5 files changed
+55
-31
No files matched your search
@@ -8,20 +8,21 @@ import type { DeployAdapter, DeployOptions, DeployResult, ShakespeareDeployConfi
|
||||
*/
|
||||
export class ShakespeareAdapter implements DeployAdapter {
|
||||
private config: ShakespeareDeployConfig;
|
||||
private baseURL: string;
|
||||
private host: string;
|
||||
|
||||
constructor(config: ShakespeareDeployConfig) {
|
||||
this.config = config;
|
||||
this.baseURL = config.baseURL || 'https://shakespeare.wtf';
|
||||
this.host = config.host || 'shakespeare.wtf';
|
||||
}
|
||||
|
||||
async deploy(options: DeployOptions): Promise<DeployResult> {
|
||||
const { projectId, fs, projectPath } = options;
|
||||
const { signer, deployServer = 'shakespeare.wtf', customHostname } = this.config;
|
||||
const { signer, deployServer, customHostname } = this.config;
|
||||
|
||||
// Use custom hostname if provided, otherwise construct from projectId.deployServer
|
||||
const hostname = customHostname || `${projectId}.${deployServer}`;
|
||||
const deployUrl = `${this.baseURL}/deploy`;
|
||||
// Use custom hostname if provided, otherwise construct from projectId.host
|
||||
const effectiveHost = deployServer || this.host;
|
||||
const hostname = customHostname || `${projectId}.${effectiveHost}`;
|
||||
const deployUrl = `https://${effectiveHost}/deploy`;
|
||||
const siteUrl = `https://${hostname}`;
|
||||
|
||||
// Check if dist directory exists and contains index.html
|
||||
|
||||
Reference in new issue
Block a user