diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 2a86bafb80db3..0000000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,121 +0,0 @@ -version: 2 - -jobs: - lint: - docker: - - image: circleci/node:lts - working_directory: ~/pingcap/docs - steps: - - checkout - - - run: - name: Setup - command: | - mkdir ~/.npm-global - npm config set prefix '~/.npm-global' - echo 'export PATH=~/.npm-global/bin:$PATH' >> $BASH_ENV - echo 'export NODE_PATH=~/.npm-global/lib/node_modules:$NODE_PATH' >> $BASH_ENV - - - run: - name: "Check file encoding" - command: | - git remote add upstream https://github.com/pingcap/docs.git - git fetch upstream - python3 scripts/check-file-encoding.py $(git diff-tree --name-only --no-commit-id -r upstream/master..HEAD -- '*.md' ':(exclude).github/*') - - - run: - name: "Check git conflicts" - command: | - python3 scripts/check-conflicts.py $(git diff-tree --name-only --no-commit-id -r upstream/master..HEAD -- '*.md' '*.yml' '*.yaml') - - - run: - name: "Install markdownlint" - command: | - npm install -g markdownlint-cli@0.17.0 - - - run: - name: "Lint edited files" - command: | - markdownlint $(git diff-tree --name-only --no-commit-id -r upstream/master..HEAD -- '*.md' ':(exclude).github/*') - - - run: - name: "Check internal links" - command: | - scripts/verify-links.sh - - - run: - name: "Check internal link anchors" - command: | - scripts/verify-link-anchors.sh - - - run: - name: "Check control characters" - command: | - python3 scripts/check-control-char.py $(git diff-tree --name-only --no-commit-id -r upstream/master..HEAD -- '*.md' ':(exclude).github/*') - - - run: - name: "Check unclosed tags" - command: | - python3 scripts/check-tags.py $(git diff-tree --name-only --no-commit-id -r upstream/master..HEAD -- '*.md' ':(exclude).github/*') - - - run: - name: "Check manual line breaks" - command: | - python3 scripts/check-manual-line-breaks.py $(git diff-tree --name-only --no-commit-id -r upstream/master..HEAD -- '*.md' ':(exclude).github/*') - - build: - docker: - - image: andelf/doc-build:0.1.9 - working_directory: ~/pingcap/docs - - steps: - - checkout - - - run: - name: install sdk and awscli - command: | - sudo pip3 install boto3 - sudo pip3 install awscli - printf "%s\n" ${AWS_ACCESS_KEY} ${AWS_SECRET_KEY} ${AWS_REGION} "json" | aws configure - - - - run: - name: "Special Check for Golang User - YOUR TAB SUCK" - command: grep -RP '\t' * | tee | grep '.md' && exit 1; echo ok - - - run: - name: "Merge Makedown Files" - command: python3 scripts/merge_by_toc.py - - - run: - name: "Generate PDF" - command: scripts/generate_pdf.sh - - # echo "222.222.95.49 uc.qbox.me": adds a new host - - deploy: - name: "Publish PDF to Qiniu and S3" - command: | - sudo bash -c 'echo "222.222.95.49 uc.qbox.me" >> /etc/hosts'; - if [ "${CIRCLE_BRANCH}" == "master" ]; then - python3 scripts/upload.py output.pdf tidb-dev-en-manual.pdf; - fi - - - run: - name: "Copy Generated PDF" - command: mkdir /tmp/artifacts && cp output.pdf doc.md /tmp/artifacts - - - store_artifacts: - path: /tmp/artifacts - -workflows: - version: 2 - lint: - jobs: - - lint - build: - jobs: - - build: - filters: - branches: - only: - - master