ci: migrate GitHub actions to Gitea actions
Deploy CV Site (andreknie.de) / deploy (push) Canceled after 0s
Deploy CV Site (andreknie.de) / deploy (push) Canceled after 0s
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
|
||||
const files = [
|
||||
path.join(process.cwd(), 'content', 'consulting', 'ki-experimentierraeume-verwaltung.yaml'),
|
||||
path.join(process.cwd(), 'content', 'consulting', 'ki-in-der-praxis.yaml'),
|
||||
path.join(process.cwd(), 'content', 'talks', 'mentor-pwc-scale-2021.yaml'),
|
||||
path.join(process.cwd(), 'content', 'talks', 'einfachbahn-agiles-arbeiten-2020.yaml')
|
||||
]
|
||||
|
||||
files.forEach(f => {
|
||||
if (fs.existsSync(f)) {
|
||||
let raw = fs.readFileSync(f, 'utf8')
|
||||
// We want to fix the description line which is description: "..."
|
||||
// Specifically, any " inside the outer " "
|
||||
raw = raw.replace(/^description: "(.*)"$/gm, (match, p1) => {
|
||||
// replace " with ' inside p1
|
||||
return 'description: "' + p1.replace(/"/g, "'") + '"'
|
||||
})
|
||||
fs.writeFileSync(f, raw)
|
||||
console.log('Fixed:', path.basename(f))
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user