1 Star 0 Fork 13

lee_learning/esp-drone

forked from 乐鑫开源/esp-drone 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.gitlab-ci.yml 2.32 KB
一键复制 编辑 原始数据 按行查看 历史
qljz1993 提交于 2020-08-20 12:17 . ci(docs): build en docs use rst
stages:
- build
- deploy
variables:
BATCH_BUILD: "1"
V: "0"
MAKEFLAGS: "-j5 --no-keep-going"
IDF_PATH: "$CI_PROJECT_DIR/esp-idf"
IDF_CI_BUILD: "1"
build_docs:
stage: build
image: $CI_SPHINX_DOCKER:latest
tags:
- build_docs
artifacts:
when: always
paths:
# English version of documentation
- docs/en/rst/sphinx-warning-log.txt
- docs/en/rst/_build/html
# Chinese version of documentation
- docs/zh_CN/md/sphinx-warning-log.txt
- docs/zh_CN/md/_build/html
expire_in: 1 week
before_script:
- echo "skip default before_script"
script:
- cd docs
# make English version of documentation
- cd en/
- cd rst/
- make clean && make html
- cd ../../
# make Chinese version of documentation
- cd zh_CN/
- cd md/
- make clean && make html
- cd ../../
push_master_to_github:
stage: deploy
only:
- master
- /^release\/v/
# when: on_success
image: $CI_DOCKER_REGISTRY/esp32-ci-env
variables:
GIT_STRATEGY: clone
GITHUB_PUSH_REFS: refs/remotes/origin/release refs/remotes/origin/master
before_script:
- echo "skip default before_script"
script:
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo -n $GH_PUSH_KEY >> ~/.ssh/id_rsa_base64
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- git remote add github git@github.com:espressif/esp-drone.git
# What the next line of script does: goes through the list of refs for all branches we push to github,
# generates a snippet of shell which is evaluated. The snippet checks CI_BUILD_REF against the SHA
# (aka objectname) at tip of each branch, and if any SHAs match then it checks out the local branch
# and then pushes that ref to a corresponding github branch
#
# NB: In gitlab 9.x, CI_BUILD_REF was deprecated. New name is CI_COMMIT_REF. If below command suddenly
# generates bash syntax errors, this is probably why.
- eval $(git for-each-ref --shell bash --format 'if [ $CI_BUILD_REF == %(objectname) ]; then git checkout -B %(refname:strip=3); git push --follow-tags github %(refname:strip=3); fi;' $GITHUB_PUSH_REFS)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/null_552_0547/esp-drone.git
git@gitee.com:null_552_0547/esp-drone.git
null_552_0547
esp-drone
esp-drone
master

搜索帮助

A270a887 8829481 3d7a4017 8829481