Commit e15f84ef authored by Amos Wenger's avatar Amos Wenger

Attempt to fix book CI job

parent e2c4606f
Pipeline #16687 failed with stages
in 2 minutes and 57 seconds
......@@ -3,6 +3,6 @@
"description": "A complete guide to the itch.io command-line tools",
"author": "Amos Wenger",
"language": "en",
"gitbook": "3.0.0-pre.9",
"gitbook": "3.2.3",
"plugins": ["anchors"]
}
//@ts-check
"use strict";
const { cd, $ } = require("@itchio/bob");
const { cd, $, $$ } = require("@itchio/bob");
async function main() {
$(`npm version`);
$(`npm install -g gitbook-cli`);
if (process.env.CI) {
// cf. https://github.com/GitbookIO/gitbook-cli/issues/110#issuecomment-669640662
let npm_prefix = $$(`npm config get prefix`);
await cd(
`${npm_prefix}/lib/node_modules/gitbook-cli/node_modules/npm/node_modules`,
async () => {
$(`npm install graceful-fs@latest --save`);
}
);
await cd(
`${process.env.HOME}/.gitbook/versions/3.2.3/node_modules/npm`,
async () => {
$(`npm install graceful-fs@latest --save`);
}
);
}
await cd("docs", async () => {
$(`npm install`);
$(`gitbook install`);
$(`gitbook build`);
});
$(
`gsutil -m cp -r -a public-read docs/_book/* gs://docs.itch.ovh/butler/${process.env.CI_BUILD_REF_NAME}/`,
`gsutil -m cp -r -a public-read docs/_book/* gs://docs.itch.ovh/butler/${process.env.CI_BUILD_REF_NAME}/`
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment