ci: migrate GitHub actions to Gitea actions
Deploy CV Site (andreknie.de) / deploy (push) Canceled after 0s

This commit is contained in:
2026-07-22 15:42:06 +02:00
parent e1cf49b0a2
commit b46de6dc7d
649 changed files with 127224 additions and 2786 deletions
@@ -0,0 +1,31 @@
import fs from 'fs'
import path from 'path'
import matter from 'gray-matter'
const CONTENT_DIR = path.join(process.cwd(), 'content')
const KNIEPUNKT_DIR = path.join(CONTENT_DIR, 'kniepunkt')
const POSTS_DIR = path.join(CONTENT_DIR, 'posts')
function getFiles(dir) {
return fs.readdirSync(dir).map(f => path.join(dir, f)).filter(f => f.endsWith('.md'))
}
const allFiles = [...getFiles(KNIEPUNKT_DIR), ...getFiles(POSTS_DIR)]
allFiles.forEach(file => {
if (fs.existsSync(file)) {
const raw = fs.readFileSync(file, 'utf8')
// Fast check for floating quotes
if (raw.includes(' " \n" \n"') || raw.includes(' "\n"\n"')) {
const data = matter(raw)
let newContent = data.content.replace(/ "\n"\n"/g, '').replace(/ " \n" \n"/g, '').replace(/^"\n"\n/g, '').replace(/\n"\n/g, '\n').replace(/"\n/g, '\n')
if (newContent !== data.content) {
data.content = newContent
fs.writeFileSync(file, matter.stringify(data.content, data.data))
console.log(`🧹 Cleaned up quotes in ${path.basename(file)}`)
}
}
}
})