-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1291 from espressif/docs_publish
fix: publish docs to production server
- Loading branch information
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Documentation Build and Production Deploy CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'docs_espressif/**' | ||
- '.github/workflows/docs_production.yml' | ||
|
||
jobs: | ||
|
||
deploy-prod-docs: | ||
name: Deploy Documentation on Production | ||
runs-on: ubuntu-22.04 | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- uses: actions/setup-python@v5 | ||
with: | ||
cache-dependency-path: docs_espressif/requirements.txt | ||
cache: 'pip' | ||
python-version: '3.10' | ||
- name: Deploy Documentation | ||
env: | ||
# Deploy to production server | ||
# DOCS_BUILD_DIR: "./docs/_build/" | ||
DOCS_DEPLOY_PRIVATEKEY: ${{ secrets.DOCS_PROD_PRIVATEKEY }} | ||
DOCS_DEPLOY_PATH: ${{ secrets.DOCS_PROD_PATH }} | ||
DOCS_DEPLOY_SERVER: ${{ secrets.DOCS_PROD_SERVER }} | ||
DOCS_DEPLOY_SERVER_USER: ${{ secrets.DOCS_PROD_USER }} | ||
DOCS_DEPLOY_URL_BASE: ${{ secrets.DOCS_PROD_URL_BASE }} | ||
run: | | ||
sudo apt update | ||
sudo apt install python3-pip python3-setuptools | ||
source ./docs_espressif/utils.sh | ||
add_doc_server_ssh_keys $DOCS_DEPLOY_PRIVATEKEY $DOCS_DEPLOY_SERVER $DOCS_DEPLOY_SERVER_USER | ||
export GIT_VER=$(git describe --always) | ||
echo "PIP install requirements..." | ||
pip3 install --user -r ./docs_espressif/requirements.txt | ||
echo "Building the Docs..." | ||
cd ./docs_espressif && build-docs -l en | ||
echo "Deploy the Docs..." | ||
export DOCS_BUILD_DIR=$GITHUB_WORKSPACE/docs_espressif/ | ||
cd $GITHUB_WORKSPACE/docs_espressif | ||
deploy-docs |