Umzug zugewiesener Repos nach WEBklar
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
51c4852488
commit
6e6c9a4c24
4 files changed
+369
-1
No files matched your search
@@ -307,6 +307,11 @@ export function buildPreviewUrl(subdomain) {
|
||||
return `https://${subdomain}.${config.preview.baseHost}`
|
||||
}
|
||||
|
||||
/** Arbeitsverzeichnis fuer den flachen Klon eines Repos beim Preview-Deploy. */
|
||||
export function previewWorkDir(repoFullName) {
|
||||
return path.join(process.cwd(), 'preview-data', repoFullName.replace(/\//g, '_'))
|
||||
}
|
||||
|
||||
/**
|
||||
* Schreibt pro deployter Preview-Subdomain einen Traefik-Router mit Host()-Regel
|
||||
* nach preview-hosts.yml, damit Let's Encrypt (HTTP-01) gueltige Zertifikate
|
||||
@@ -421,7 +426,7 @@ export async function runDeploy(repoFullName, branch, previewConfig) {
|
||||
|
||||
const subdomain = previewConfig.subdomain || repoFullName.split('/').pop()
|
||||
const cloneUrl = `${config.gitea.baseUrl}/${repoFullName}.git`
|
||||
const workDir = path.join(process.cwd(), 'preview-data', repoFullName.replace(/\//g, '_'))
|
||||
const workDir = previewWorkDir(repoFullName)
|
||||
const targetDir = path.join(config.preview.deployRoot, subdomain)
|
||||
|
||||
await cloneRepo(cloneUrl, workDir, branch, config.gitea.apiToken)
|
||||
|
||||
Reference in new issue
Block a user