Git Product home page Git Product logo

gitbook-action's Introduction

Hi there 👋

gitbook-action's People

Contributors

gcs-zhn avatar imgbotapp avatar windard avatar zanderzhao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gitbook-action's Issues

Setting publish_remove_last_build: true and publish_dir not / generates error from cp

I am using the following settings:

publish_dir: draft
publish_remove_last_build: true

With this setting, the directory ./local_publish/draft is created with mkdir, then ./local_publish/draft is
deleted with git rm command. This then generates an error in the cp command because
./local_publish/draft is no longer present. I see the following in the build log:

cp: target 'local_publish/draft' is not a directory

Does the order of the mkdir and git rm commands need to be reversed in the publish section of entrypoint.sh?

######################### For publish #########################################

# if branch is new, need pubilsh_dir(if not /)
if [ ! -d "./local_publish/${INPUT_PUBLISH_DIR}" ] ; then
  mkdir ./local_publish/${INPUT_PUBLISH_DIR}
fi

#  need or not gitbook build history
if [ ${INPUT_PUBLISH_REMOVE_LAST_BUILD} = "true" ] ; then
  cd local_publish
  git rm -rf --ignore-unmatch  ./${INPUT_PUBLISH_DIR}/*
#  git rm -rf --ignore-unmatch  ./${INPUT_PUBLISH_DIR}/.*
  cd ..
fi

# move build file to each publish dir
cp -rfp local_source/_book/.  local_publish/${INPUT_PUBLISH_DIR}

`修订时间` 的显示问题

您好,首先特别感谢您开发本Action工具,我使用后感觉非常好用,但是有一个小问题的,git push --force_book中的所有文件强制推送到gh-pages分支后,导致所有页面页脚处显示的修改时间都会变化,而不是只修改特定的网页,请问如何解决?
不好意思,我是小白,提的问题比较小儿科,望能帮忙解决。

是否可以传入 npm 命令或者 apt 命令进行一些额外的依赖包安装

问题:在生成 PDF 或者 mobi 等电子书的时候,在生成的时候将 svg 转成 png 图片的时候有问题

error: error while generating page "README.md": 

Error: Error converting /tmp/tmp-281LPVxSm5Bv6U1/842cb21f.svg into /tmp/tmp-281LPVxSm5Bv6U1/302430b8.png

网上搜了一下需要安装指定 svgexport 版本,但是 Gitbook 本身的配置文件中是没有无关的版本依赖的,需要在生成之前执行 npm 命令安装

npm install svgexport -g

希望能够提供这个功能,类似于现在已有的 font_install 字段

Not working on any Gitbook repository

Even when I forked this repository and ran the action, I got the following error messages and the build failed:

info: installing plugin "sitemap-general" 
info: install plugin "sitemap-general" (git+https://github.com/plugins-zander/gitbook-plugin-sitemap-general.git) from NPM with version git+https://github.com/plugins-zander/gitbook-plugin-sitemap-general.git
/github/home/.gitbook/versions/3.2.3/node_modules/npm/node_modules/aproba/index.js:25
    if (args[ii] == null) throw missingRequiredArg(ii)
                          ^
Error: Missing required argument #1
    at andLogAndFinish (/github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:31:3)
    at fetchPackageMetadata (/github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:51:22)
    at resolveWithNewModule (/github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/install/deps.js:490:12)
    at /github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/install/deps.js:491:7
    at /github/home/.gitbook/versions/3.2.3/node_modules/npm/node_modules/iferr/index.js:13:50
    at /github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:37:12
    at addRequestedAndFinish (/github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:67:5)
    at returnAndAddMetadata (/github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:121:7)
    at pickVersionFromRegistryDocument (/github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:138:20)
    at /github/home/.gitbook/versions/3.2.3/node_modules/npm/node_modules/iferr/index.js:13:50 {
  code: 'EMISSINGARG'
}
+ gitbook build --gitbook=
info: 11 plugins are installed 
Error: Couldn't locate plugins "sitemap-general, gtag, chapter-fold, copy-code-button", Run 'gitbook install' to install plugins from registry.
+ [ 1 -eq 0 ]
+ print_error 3105: gitbook build failed, please check is there something wrong with your book.json
+ echo \033[31m ERROR 3105: gitbook build failed, please check is there something wrong with your book.json  \033[0m \a \n 
 ERROR 3105: gitbook build failed, please check is there something wrong with your book.json   � 
+ echo \033[32m Find Detail From: https://zanderzhao.github.io/gitbook-action/error \033[0m
+ exit 1
 Find Detail From: https://zanderzhao.github.io/gitbook-action/error

It doesn't matter what the configuration or plugins are, with another repository I got the following error still:

info: install plugin "sitemap" (*) from NPM with version 1.2.0 
/github/home/.gitbook/versions/3.2.3/node_modules/npm/node_modules/aproba/index.js:25
    if (args[ii] == null) throw missingRequiredArg(ii)
                          ^
Error: Missing required argument #1
    at andLogAndFinish (/github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:31:3)
    at fetchPackageMetadata (/github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:51:22)
    at resolveWithNewModule (/github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/install/deps.js:490:12)
    at /github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/install/deps.js:491:7
    at /github/home/.gitbook/versions/3.2.3/node_modules/npm/node_modules/iferr/index.js:13:50
    at /github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:37:12
    at addRequestedAndFinish (/github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:67:5)
    at returnAndAddMetadata (/github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:121:7)
    at pickVersionFromRegistryDocument (/github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:138:20)
    at /github/home/.gitbook/versions/3.2.3/node_modules/npm/node_modules/iferr/index.js:13:50 {
  code: 'EMISSINGARG'
}
+ gitbook build --gitbook=
info: 7 plugins are installed 
info: 10 explicitly listed 
Error: Couldn't locate plugins "sitemap, alerts, edit-link, codepen", Run 'gitbook install' to install plugins from registry.
+ [ 1 -eq 0 ]
 Find Detail From: https://zanderzhao.github.io/gitbook-action/error
+ print_error 3105:gitbook built fail,please check is there something wrong with your book.json or others
+ echo \033[31m ERROR 3105:gitbook built fail,please check is there something wrong with your book.json or others  \033[0m \a \n 
 ERROR 3105:gitbook built fail,please check is there something wrong with your book.json or others   � 
+ echo \033[32m Find Detail From: https://zanderzhao.github.io/gitbook-action/error \033[0m
+ exit 1

Publish sucessfully, But Github pages build fail

I am having problems getting this action to work and I am stuck trying to figure out what am I doing wrong.

I have the action working on projects like this but on this one always says ...

Your site is having problems building: Page build failed. For more information, see https://docs.github.com/github/working-with-github-pages/troubleshooting-jekyll-build-errors-for-github-pages-sites#troubleshooting-build-errors.

The output of the job scheduled by the action does not throw any error. Also, I am able to gitbook serve and build the book locally. I have added also a .nojekyll file, but nothing works.

Thanks for sharing your knowledge and your work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.