diff --git a/.github/workflows/gitbook-branch.yml b/.github/workflows/gitbook-branch.yml new file mode 100644 index 000000000..fa1883694 --- /dev/null +++ b/.github/workflows/gitbook-branch.yml @@ -0,0 +1,21 @@ +name: 'Gitbook-Branch' + +on: + push: + branches: + - '[0-9]+.[0-9]+.[0-9]+.doc' #eg: 2.20.04.doc +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout action + uses: actions/checkout@v4 + + - name: Gitbook Action + uses: zanderzhao/gitbook-action@v1.2.4 # https://github.com/ZanderZhao/gitbook-action/releases + with: # Just example, click above, use latest please + token: ${{ secrets.PUBLISH_TOKEN }} + time_zone: Asia/Shanghai # set time zone + source_branch: ${{ github.ref_name }} + publish_push_force: true + publish_dir: /history/${{ github.ref_name }}/ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0655d175c..000000000 --- a/.travis.yml +++ /dev/null @@ -1,65 +0,0 @@ -dist: trusty -env: - global: - - GH_REF: github.com/actiontech/dble-docs-cn - - GH_USER: actiontech-bot - - GH_MAIL: github@actionsky.com - -# 指定环境语言 -language: node_js -# 指定sudo权限 -sudo: required -# 指定node版本 -node_js: v14.2.0 -# 指定缓存模块,缓存可以加速编译 -cache: - directories: - - node_modules - -# 邮件通知 -notifications: - email: - recipients: - - yanhuqing@actionsky.com - on_success: never # default: change - on_failure: always # default: always - -# 构建的分支 -branches: - only: - - master - - develop - - /^[0-9]{1}.[0-9]{2}.[0-9]{2}.doc$/ #eg: 2.20.04.doc -# 调整时区 -before_install: - - export TZ='Asia/Shanghai' - - sudo apt-get install -y calibre fonts-arphic-gbsn00lp - -# 安装环境 -install: - - npm install -g gitbook-cli - - npm install gitbook-plugin-yahei - - gitbook install -# gitbook生成静态文件 -script: - - gitbook build -deploy: - # deploy develop to the staging environment - - provider: script - skip_cleanup: true - script: bash ./deploy.sh develop 1 ${GH_TOKEN} $TRAVIS_BUILD_NUMBER - on: - branch: develop - # deploy master to production - - provider: script - skip_cleanup: true - script: bash ./deploy.sh master 1 ${GH_TOKEN} $TRAVIS_BUILD_NUMBER - on: - branch: master - #branch eg: 2.20.04.doc - - provider: script - skip_cleanup: true - script: bash ./deploy.sh $TRAVIS_BRANCH 1 ${GH_TOKEN} $TRAVIS_BUILD_NUMBER - on: - all_branches: true - condition: $TRAVIS_BRANCH =~ ^[0-9]{1}.[0-9]{2}.[0-9]{2}.doc$