Skip to content

Commit 5501ac6

Browse files
committed
Added back the deploy on PR - Clean CI 10
1 parent 986cae2 commit 5501ac6

File tree

2 files changed

+59
-5
lines changed

2 files changed

+59
-5
lines changed

.github/workflows/docs.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@ jobs:
3232
env:
3333
# Deploy to production server
3434
# DOCS_BUILD_DIR: "./docs/_build/"
35-
# DOCS_DEPLOY_PRIVATEKEY: ${{ secrets.DOCS_DEPLOY_KEY }}
35+
# DOCS_DEPLOY_PRIVATEKEY: ${{ secrets.DOCS_PROD_PRIVATEKEY }}
36+
# DOCS_DEPLOY_PATH: ${{ secrets.DOCS_PROD_PATH }}
3637
# DOCS_DEPLOY_SERVER: ${{ secrets.DOCS_SERVER }}
37-
# DOCS_DEPLOY_SERVER_USER: ${{ secrets.DOCS_SERVER_USER }}
38-
# DOCS_DEPLOY_PATH: ${{ secrets.DOCS_PATH }}
39-
# DOCS_DEPLOY_URL_BASE: ${{ secrets.DOCS_URL }}
38+
# DOCS_DEPLOY_SERVER_USER: ${{ secrets.DOCS_PROD_USER }}
39+
# DOCS_DEPLOY_URL_BASE: ${{ secrets.DOCS_PROD_URL_BASE }}
4040
# Deploy to preview server
4141
TYPE: "preview"
4242
# DOCS_BUILD_DIR: "./docs/_build"
4343
DOCS_DEPLOY_PRIVATEKEY: ${{ secrets.DOCS_KEY }}
4444
DOCS_DEPLOY_PATH: ${{ secrets.DOCS_PATH }}
4545
DOCS_DEPLOY_SERVER: ${{ secrets.DOCS_SERVER }}
46-
DOCS_DEPLOY_URL_BASE: ${{ secrets.DOCS_URL }}
4746
DOCS_DEPLOY_SERVER_USER: ${{ secrets.DOCS_USER }}
47+
DOCS_DEPLOY_URL_BASE: ${{ secrets.DOCS_URL }}
4848
run: |
4949
sudo apt update
5050
sudo apt install python3-pip python3-setuptools

.github/workflows/docs_deploy.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Documentation Build and Deploy CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- release/*
8+
paths:
9+
- 'docs/**'
10+
- '.github/workflows/docs.yml'
11+
pull_request:
12+
paths:
13+
- 'docs/**'
14+
- '.github/workflows/docs.yml'
15+
16+
jobs:
17+
18+
deploy-preview-docs:
19+
name: Deploy Documentation
20+
runs-on: ubuntu-22.04
21+
defaults:
22+
run:
23+
shell: bash
24+
steps:
25+
- uses: actions/checkout@v3
26+
with:
27+
submodules: true
28+
- uses: actions/setup-python@v4
29+
with:
30+
python-version: '3.10'
31+
- name: Deploy Preview
32+
env:
33+
# Deploy to production server
34+
# DOCS_BUILD_DIR: "./docs/_build/"
35+
DOCS_DEPLOY_PRIVATEKEY: ${{ secrets.DOCS_PROD_PRIVATEKEY }}
36+
DOCS_DEPLOY_PATH: ${{ secrets.DOCS_PROD_PATH }}
37+
DOCS_DEPLOY_SERVER: ${{ secrets.DOCS_SERVER }}
38+
DOCS_DEPLOY_SERVER_USER: ${{ secrets.DOCS_PROD_USER }}
39+
DOCS_DEPLOY_URL_BASE: ${{ secrets.DOCS_PROD_URL_BASE }}
40+
# Deploy to preview server
41+
run: |
42+
sudo apt update
43+
sudo apt install python3-pip python3-setuptools
44+
source ./docs/utils.sh
45+
add_doc_server_ssh_keys $DOCS_DEPLOY_PRIVATEKEY $DOCS_DEPLOY_SERVER $DOCS_DEPLOY_SERVER_USER
46+
export GIT_VER=$(git describe --always)
47+
echo "PIP install requirements..."
48+
pip3 install --user -r ./docs/requirements.txt
49+
echo "Building the Docs..."
50+
cd ./docs && build-docs -l en
51+
echo "Deploy the Docs..."
52+
export DOCS_BUILD_DIR=$GITHUB_WORKSPACE/docs/
53+
cd $GITHUB_WORKSPACE/docs
54+
deploy-docs

0 commit comments

Comments
 (0)