Tucker McKnight <tucker@pangolin.lan> | Sun Jan 11 2026
logging statements, trying to debug why site generation fails on post-receive
108 109 110 111 112 113 114 115 116 117
const tempDir = `${directories.output}${reposPath}${tempDirName}`
const tempDirRepoPath = `${tempDir}/${eleventyConfig.getFilter("slugify")(repoName)}`
await exec(`mkdir ${tempDir}`)
await exec(`git clone -s ${directories.output}${eleventyConfig.getFilter("slugify")(repoName)}.git ${tempDirRepoPath}`)
for (let branch of repoConfig.branchesToPull) {
await exec(`git -C ${tempDirRepoPath} checkout ${branch}`)
for (let buildStep of repoConfig.buildSteps) {
// Run the command for each step in each branch
await exec(`(cd ${tempDirRepoPath} && ${buildStep.command})`)
// Copy the specified folders from the "from" to the "to" dir
await exec(`cp -r ${tempDirRepoPath}/${buildStep.copyFrom} ${directories.output}${eleventyConfig.getFilter("slugify")(repoName)}/branches/${eleventyConfig.getFilter("slugify")(branch)}/${buildStep.copyTo}`)108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
const tempDir = `${directories.output}${reposPath}${tempDirName}`
const tempDirRepoPath = `${tempDir}/${eleventyConfig.getFilter("slugify")(repoName)}`
await exec(`mkdir ${tempDir}`)
const cloneResult = await exec(`git clone -s ${directories.output}${eleventyConfig.getFilter("slugify")(repoName)}.git ${tempDirRepoPath}`)
console.log("clone result awaited")
console.log(cloneResult)
for (let branch of repoConfig.branchesToPull) {
console.log(`in branch ${branch}, ls tempdirrepopath then checkout ${branch}`)
console.log(await exec(`ls -lha ${tempDirRepoPath}`))
await exec(`git -C ${tempDirRepoPath} checkout ${branch}`)
for (let buildStep of repoConfig.buildSteps) {
// Run the command for each step in each branch
console.log(`cding into ${tempDirRepoPath}`)
await exec(`(cd ${tempDirRepoPath} && ${buildStep.command})`)
// Copy the specified folders from the "from" to the "to" dir
await exec(`cp -r ${tempDirRepoPath}/${buildStep.copyFrom} ${directories.output}${eleventyConfig.getFilter("slugify")(repoName)}/branches/${eleventyConfig.getFilter("slugify")(branch)}/${buildStep.copyTo}`)