文档生成的 json 放 gh-pages
This commit is contained in:
parent
a430f896bb
commit
6fa3250639
|
@ -35,5 +35,5 @@ glob('./docs/**/*.md', {}, function (er, docs) {
|
||||||
path: doc.replace('.md', '')
|
path: doc.replace('.md', '')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
fs.writeFileSync('./public/docs/docs.json', JSON.stringify(resultData));
|
fs.writeFileSync('./gh-pages/docs/docs.json', JSON.stringify(resultData));
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ -z "$(git status --porcelain)" ]; then
|
if [ -z "$(git status --porcelain)" ]; then
|
||||||
# Working directory clean
|
# Working directory clean
|
||||||
echo "Working directory clean"
|
echo "Working directory clean"
|
||||||
else
|
else
|
||||||
# Uncommitted changes
|
# Uncommitted changes
|
||||||
read -p "You got uncommitted changes, press y to continue? " -n 1 -r
|
read -p "You got uncommitted changes, press y to continue? " -n 1 -r
|
||||||
echo # (optional) move to a new line
|
echo # (optional) move to a new line
|
||||||
|
@ -21,6 +21,8 @@ fis3 release gh-pages -c
|
||||||
|
|
||||||
node ./build/upload2cdn.js $1
|
node ./build/upload2cdn.js $1
|
||||||
|
|
||||||
|
node ./build/generate-search-data.js
|
||||||
|
|
||||||
git add gh-pages -f
|
git add gh-pages -f
|
||||||
|
|
||||||
git commit -m "更新 gh-pages"
|
git commit -m "更新 gh-pages"
|
||||||
|
@ -33,4 +35,4 @@ git commit -m 'rebuild pages' --allow-empty
|
||||||
|
|
||||||
git push origin
|
git push origin
|
||||||
|
|
||||||
echo "done"
|
echo "done"
|
||||||
|
|
Loading…
Reference in New Issue