ci: fix index rebuild order [skip ci]
This commit is contained in:
15
.github/index.mjs
vendored
15
.github/index.mjs
vendored
@@ -20,6 +20,8 @@ const __readme = paths.join(__metrics, ".github/readme")
|
|||||||
const git = sgit(__metrics)
|
const git = sgit(__metrics)
|
||||||
const staged = new Set()
|
const staged = new Set()
|
||||||
|
|
||||||
|
for (const step of ["config", "documentation"]) {
|
||||||
|
|
||||||
//Load plugins metadata
|
//Load plugins metadata
|
||||||
const {plugins, templates, packaged, descriptor} = await metadata({log:false})
|
const {plugins, templates, packaged, descriptor} = await metadata({log:false})
|
||||||
|
|
||||||
@@ -35,12 +37,19 @@ async function update({source, output, options = {}}) {
|
|||||||
staged.add(file)
|
staged.add(file)
|
||||||
}
|
}
|
||||||
|
|
||||||
//Rendering
|
//Templating
|
||||||
|
switch (step) {
|
||||||
|
case "config":
|
||||||
|
await update({source:paths.join(__action, "action.yml"), output:"action.yml"})
|
||||||
|
await update({source:paths.join(__web, "settings.example.json"), output:"settings.example.json"})
|
||||||
|
break
|
||||||
|
case "documentation":
|
||||||
await update({source:paths.join(__readme, "README.md"), output:"README.md", options:{root:__readme}})
|
await update({source:paths.join(__readme, "README.md"), output:"README.md", options:{root:__readme}})
|
||||||
await update({source:paths.join(__readme, "partials/documentation/plugins.md"), output:"source/plugins/README.md"})
|
await update({source:paths.join(__readme, "partials/documentation/plugins.md"), output:"source/plugins/README.md"})
|
||||||
await update({source:paths.join(__readme, "partials/documentation/templates.md"), output:"source/templates/README.md"})
|
await update({source:paths.join(__readme, "partials/documentation/templates.md"), output:"source/templates/README.md"})
|
||||||
await update({source:paths.join(__action, "action.yml"), output:"action.yml"})
|
break
|
||||||
await update({source:paths.join(__web, "settings.example.json"), output:"settings.example.json"})
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Commit and push
|
//Commit and push
|
||||||
if (mode === "publish") {
|
if (mode === "publish") {
|
||||||
|
|||||||
Reference in New Issue
Block a user