Skip to content

Commit 5dea911

Browse files
committed
Added secret keys env vars
1 parent 95fd1d0 commit 5dea911

File tree

1 file changed

+33
-2
lines changed

1 file changed

+33
-2
lines changed

Diff for: .github/workflows/docs.yml

+33-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: ReadTheDocs CI
1+
name: Docs CI
22

33
on:
44
push:
@@ -50,14 +50,45 @@ jobs:
5050
- uses: actions/setup-python@v2
5151
with:
5252
python-version: '3.x'
53-
- name: Deploy
53+
- name: Deploy Production
5454
env:
5555
DOCS_BUILD_DIR: "./docs/_build/"
56+
DOCS_DEPLOY_PRIVATEKEY: ${{ secrets.DOCS_DEPLOY_KEY }}
57+
DOCS_DEPLOY_SERVER: ${{ secrets.DOCS_PROD_SERVER }}
58+
DOCS_DEPLOY_SERVER_USER: ${{ secrets.DOCS_PROD_SERVER_USER }}
5659
DOCS_DEPLOY_URL_BASE: "https://docs.espressif.com/projects/arduino-esp32"
5760
run: |
61+
PATH=/home/runner/.local/bin:$PATH pip install -r ./docs/requirements.txt --prefer-binary
5862
PATH=/home/runner/.local/bin:$PATH source ./docs/utils.sh
5963
PATH=/home/runner/.local/bin:$PATH add_doc_server_ssh_keys $DOCS_DEPLOY_PRIVATEKEY $DOCS_DEPLOY_SERVER $DOCS_DEPLOY_SERVER_USER
6064
PATH=/home/runner/.local/bin:$PATH export GIT_VER=$(git describe --always)
65+
cd ./docs && PATH=/home/runner/.local/bin:$PATH build-docs -l en
66+
PATH=/home/runner/.local/bin:$PATH deploy-docs
67+
68+
deploy-preview-docs:
69+
name: Deploy Preview Docs
70+
runs-on: ubuntu-latest
71+
defaults:
72+
run:
73+
shell: bash
74+
steps:
75+
- uses: actions/checkout@v2
76+
with:
77+
submodules: true
78+
- uses: actions/setup-python@v2
79+
with:
80+
python-version: '3.x'
81+
- name: Deploy Preview
82+
env:
83+
DOCS_BUILD_DIR: "./docs/_build/"
84+
DOCS_DEPLOY_PRIVATEKEY: ${{ secrets.DOCS_DEPLOY_KEY }}
85+
DOCS_DEPLOY_SERVER: ${{ secrets.DOCS_PREV_SERVER }}
86+
DOCS_DEPLOY_SERVER_USER: ${{ secrets.DOCS_PREV_SERVER_USER }}
87+
DOCS_DEPLOY_URL_BASE: "https://docs.espressif.com/projects/preview/arduino-esp32"
88+
run: |
6189
PATH=/home/runner/.local/bin:$PATH pip install -r ./docs/requirements.txt --prefer-binary
90+
PATH=/home/runner/.local/bin:$PATH source ./docs/utils.sh
91+
PATH=/home/runner/.local/bin:$PATH add_doc_server_ssh_keys $DOCS_DEPLOY_PRIVATEKEY $DOCS_DEPLOY_SERVER $DOCS_DEPLOY_SERVER_USER
92+
PATH=/home/runner/.local/bin:$PATH export GIT_VER=$(git describe --always)
6293
cd ./docs && PATH=/home/runner/.local/bin:$PATH build-docs -l en
6394
PATH=/home/runner/.local/bin:$PATH deploy-docs

0 commit comments

Comments
 (0)