[Docs] CI changed deploy server from preview to production (#9127)

* Changed the docs server from preview to deploy

* Removed one extra line

* Added on release action to the docs deploy CI

* Fix CI workflow file name in the path
This commit is contained in:
Pedro Minatel 2024-01-17 18:08:00 +00:00 committed by GitHub
parent c0c687ce10
commit a871518e51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 57 deletions

View file

@ -7,11 +7,11 @@ on:
- release/* - release/*
paths: paths:
- 'docs/**' - 'docs/**'
- '.github/workflows/docs.yml' - '.github/workflows/docs_build.yml'
pull_request: pull_request:
paths: paths:
- 'docs/**' - 'docs/**'
- '.github/workflows/docs.yml' - '.github/workflows/docs_build.yml'
jobs: jobs:
@ -42,4 +42,3 @@ jobs:
with: with:
name: docs name: docs
path: docs path: docs

View file

@ -1,12 +1,15 @@
name: Documentation Build and Production Deploy CI name: Documentation Build and Production Deploy CI
on: on:
release:
types: [published]
push: push:
branches: branches:
- release/* - release/*
- master
paths: paths:
- 'docs/**' - 'docs/**'
- '.github/workflows/docs.yml' - '.github/workflows/docs_deploy.yml'
jobs: jobs:
@ -27,12 +30,11 @@ jobs:
env: env:
# Deploy to production server # Deploy to production server
# DOCS_BUILD_DIR: "./docs/_build/" # DOCS_BUILD_DIR: "./docs/_build/"
DOCS_DEPLOY_PRIVATEKEY: ${{ secrets.DOCS_PROD_PRIVATEKEY }} DOCS_DEPLOY_PRIVATEKEY: ${{ secrets.DOCS_KEY }}
DOCS_DEPLOY_PATH: ${{ secrets.DOCS_PROD_PATH }} DOCS_DEPLOY_PATH: ${{ secrets.DOCS_PATH }}
DOCS_DEPLOY_SERVER: ${{ secrets.DOCS_SERVER }} DOCS_DEPLOY_SERVER: ${{ secrets.DOCS_SERVER }}
DOCS_DEPLOY_SERVER_USER: ${{ secrets.DOCS_PROD_USER }} DOCS_DEPLOY_SERVER_USER: ${{ secrets.DOCS_USER }}
DOCS_DEPLOY_URL_BASE: ${{ secrets.DOCS_PROD_URL_BASE }} DOCS_DEPLOY_URL_BASE: ${{ secrets.DOCS_URL }}
# Deploy to preview server
run: | run: |
sudo apt update sudo apt update
sudo apt install python3-pip python3-setuptools sudo apt install python3-pip python3-setuptools

View file

@ -1,48 +0,0 @@
name: Documentation Build and Preview Deploy CI
on:
push:
branches:
- master
paths:
- 'docs/**'
- '.github/workflows/docs.yml'
jobs:
deploy-preview-docs:
name: Deploy Documentation
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Deploy Preview
env:
# Deploy to preview server
# DOCS_BUILD_DIR: "./docs/_build"
DOCS_DEPLOY_PRIVATEKEY: ${{ secrets.DOCS_KEY }}
DOCS_DEPLOY_PATH: ${{ secrets.DOCS_PATH }}
DOCS_DEPLOY_SERVER: ${{ secrets.DOCS_SERVER }}
DOCS_DEPLOY_SERVER_USER: ${{ secrets.DOCS_USER }}
DOCS_DEPLOY_URL_BASE: ${{ secrets.DOCS_URL }}
run: |
sudo apt update
sudo apt install python3-pip python3-setuptools
source ./docs/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/requirements.txt
echo "Building the Docs..."
cd ./docs && build-docs -l en
echo "Deploy the Docs..."
export DOCS_BUILD_DIR=$GITHUB_WORKSPACE/docs/
cd $GITHUB_WORKSPACE/docs
deploy-docs