mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
docs: deploy built docs
This commit is contained in:
parent
1d3626c119
commit
4f71d741ec
@ -103,7 +103,7 @@ build_docs:
|
|||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- docs/_build/html
|
- docs/_build/html
|
||||||
expire_in: 6 mos
|
expire_in: 1 mos
|
||||||
|
|
||||||
|
|
||||||
test_nvs_on_host:
|
test_nvs_on_host:
|
||||||
@ -173,6 +173,31 @@ push_master_to_github:
|
|||||||
- git push --follow-tags github HEAD:master
|
- git push --follow-tags github HEAD:master
|
||||||
|
|
||||||
|
|
||||||
|
deploy_docs:
|
||||||
|
before_script:
|
||||||
|
- echo "Not setting up GitLab key, not fetching submodules"
|
||||||
|
stage: deploy
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
- triggers
|
||||||
|
tags:
|
||||||
|
- deploy
|
||||||
|
image: espressif/esp32-ci-env
|
||||||
|
script:
|
||||||
|
- mkdir -p ~/.ssh
|
||||||
|
- chmod 700 ~/.ssh
|
||||||
|
- echo -n $DOCS_DEPLOY_KEY > ~/.ssh/id_rsa_base64
|
||||||
|
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
|
||||||
|
- chmod 600 ~/.ssh/id_rsa
|
||||||
|
- echo -e "Host $DOCS_SERVER\n\tStrictHostKeyChecking no\n\tUser $DOCS_SERVER_USER\n" >> ~/.ssh/config
|
||||||
|
- export GIT_VER=$(git describe --always)
|
||||||
|
- cd docs/_build/
|
||||||
|
- mv html $GIT_VER
|
||||||
|
- tar czvf $GIT_VER.tar.gz $GIT_VER
|
||||||
|
- scp $GIT_VER.tar.gz $DOCS_SERVER:$DOCS_PATH
|
||||||
|
- ssh $DOCS_SERVER -x "cd $DOCS_PATH && tar xzvf $GIT_VER.tar.gz && rm -f latest && ln -s $GIT_VER latest"
|
||||||
|
|
||||||
|
|
||||||
# AUTO GENERATED PART START, DO NOT MODIFY CONTENT BELOW
|
# AUTO GENERATED PART START, DO NOT MODIFY CONTENT BELOW
|
||||||
# template for test jobs
|
# template for test jobs
|
||||||
.test_template: &test_template
|
.test_template: &test_template
|
||||||
|
22
docs/conf.py
22
docs/conf.py
@ -26,9 +26,20 @@ import os
|
|||||||
# added by krzychb, 24-Oct-2016
|
# added by krzychb, 24-Oct-2016
|
||||||
#
|
#
|
||||||
|
|
||||||
from subprocess import call
|
from subprocess import call, Popen, PIPE
|
||||||
|
import shlex
|
||||||
|
|
||||||
call('doxygen')
|
call('doxygen')
|
||||||
|
|
||||||
|
# -- Function to get output of a command ----------------------------------
|
||||||
|
def run_cmd_get_output(cmd):
|
||||||
|
process = Popen(shlex.split(cmd), stdout=PIPE)
|
||||||
|
(output, err) = process.communicate()
|
||||||
|
exit_code = process.wait()
|
||||||
|
if exit_code != 0:
|
||||||
|
raise RuntimeError('command line program has failed')
|
||||||
|
return output
|
||||||
|
|
||||||
|
|
||||||
# -- General configuration ------------------------------------------------
|
# -- General configuration ------------------------------------------------
|
||||||
|
|
||||||
@ -64,10 +75,13 @@ copyright = u'2016, Espressif'
|
|||||||
# |version| and |release|, also used in various other places throughout the
|
# |version| and |release|, also used in various other places throughout the
|
||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# This is supposed to be "the short X.Y version", but it's the only version
|
||||||
version = '1.0'
|
# visible when you open index.html.
|
||||||
|
# Display full version to make things less confusing.
|
||||||
|
# If needed, nearest tag is returned by 'git describe --abbrev=0'.
|
||||||
|
version = run_cmd_get_output('git describe')
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = '1.0'
|
release = run_cmd_get_output('git describe')
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
Loading…
Reference in New Issue
Block a user