this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

add workflow to build and deploy docs (#826)

* fix sphinx errors

* split requirements for docs

* add workflow to build docs

* docs build workflow update python

* change artifact retention time to 30 days

* build docs only on master

* skip Deploy Care workflow if changes are only in docs

* use furo theme

authored by

Aakash Singh and committed by
GitHub
17e86cb2 fcbc9cc8

+80 -11
+12 -8
.github/workflows/deployment.yaml
··· 6 6 branches: 7 7 - master 8 8 - production 9 + paths-ignore: 10 + - 'docs/**' 9 11 push: 10 12 branches: 11 13 - master 12 14 - production 15 + paths-ignore: 16 + - 'docs/**' 13 17 14 18 env: 15 19 IMAGE_NAME: care ··· 200 204 token: ${{ secrets.GIT_ACCESS_TOKEN }} 201 205 path: kube 202 206 ref: main 203 - 207 + 204 208 - name: install kubectl 205 209 uses: azure/setup-kubectl@v2.0 206 210 with: 207 211 version: 'v1.23.6' 208 212 id: install 209 - 213 + 210 214 - name: Configure AWS credentials 211 215 uses: aws-actions/configure-aws-credentials@v1 212 216 with: ··· 243 247 token: ${{ secrets.GIT_ACCESS_TOKEN }} 244 248 path: kube 245 249 ref: main 246 - 250 + 247 251 - name: install kubectl 248 252 uses: azure/setup-kubectl@v2.0 249 253 with: 250 254 version: 'v1.23.6' 251 255 id: install 252 - 256 + 253 257 - name: Configure AWS credentials 254 258 uses: aws-actions/configure-aws-credentials@v1 255 259 with: ··· 286 290 token: ${{ secrets.GIT_ACCESS_TOKEN }} 287 291 path: kube 288 292 ref: main 289 - 293 + 290 294 - name: install kubectl 291 295 uses: azure/setup-kubectl@v2.0 292 296 with: 293 297 version: 'v1.23.6' 294 298 id: install 295 - 299 + 296 300 - name: Configure AWS credentials 297 301 uses: aws-actions/configure-aws-credentials@v1 298 302 with: ··· 329 333 token: ${{ secrets.GIT_ACCESS_TOKEN }} 330 334 path: kube 331 335 ref: main 332 - 336 + 333 337 # Setup gcloud CLI 334 338 - uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7 335 339 with: ··· 342 346 cluster_name: ${{ secrets.GKE_CLUSTER }} 343 347 location: ${{ secrets.GKE_ZONE }} 344 348 credentials: ${{ secrets.GKE_SA_KEY }} 345 - 349 + 346 350 - name: install kubectl 347 351 uses: azure/setup-kubectl@v2.0 348 352 with:
+62
.github/workflows/docs.yml
··· 1 + name: Build Docs 2 + 3 + on: 4 + push: 5 + branches: 6 + - master 7 + paths: 8 + - "docs/**" 9 + pull_request: 10 + branches: 11 + - master 12 + paths: 13 + - "docs/**" 14 + workflow_dispatch: 15 + 16 + jobs: 17 + build-docs: 18 + name: Build documentation 19 + runs-on: ubuntu-latest 20 + steps: 21 + - uses: actions/checkout@v3 22 + 23 + - uses: actions/setup-python@v3 24 + with: 25 + python-version: "3.10" 26 + 27 + - name: Install dependencies 28 + run: | 29 + pip install -r requirements/docs.txt 30 + 31 + - name: Build docs 32 + run: | 33 + make -C ./docs html 34 + 35 + - name: Upload sphinx documentation 36 + uses: actions/upload-artifact@v3 37 + with: 38 + name: sphinx-docs 39 + path: ./docs/_build 40 + retention-days: 30 41 + 42 + deploy-docs: 43 + if: github.ref == 'refs/heads/master' 44 + name: Deploy documentation 45 + runs-on: ubuntu-latest 46 + needs: build-docs 47 + steps: 48 + - name: Download sphinx documentation 49 + uses: actions/download-artifact@v3 50 + with: 51 + name: sphinx-docs 52 + path: ./build 53 + 54 + - name: Add files to bypass jekyll build 55 + run: | 56 + touch build/.nojekyll 57 + 58 + - name: Deploy docs 59 + uses: JamesIves/github-pages-deploy-action@4.3.3 60 + with: 61 + branch: gh-pages 62 + folder: build
docs/_static/.gitkeep

This is a binary file and will not be displayed.

+1 -1
docs/conf.py
··· 47 47 # The theme to use for HTML and HTML Help pages. See the documentation for 48 48 # a list of builtin themes. 49 49 # 50 - html_theme = "sphinx_book_theme" 50 + html_theme = "furo" 51 51 52 52 # Add any paths that contain custom static files (such as style sheets) here, 53 53 # relative to this directory. They are copied after the builtin static files,
+4
requirements/docs.txt
··· 1 + # Documentation 2 + # ------------------------------------------------------------------------------ 3 + sphinx==5.0.1 # https://github.com/sphinx-doc/sphinx 4 + furo==2022.06.04.1 # https://github.com/pradyunsg/furo
+1 -2
requirements/local.txt
··· 1 1 -r ./base.txt 2 + -r ./docs.txt 2 3 Werkzeug==1.0.0 # https://github.com/pallets/werkzeug 3 4 ipdb==0.13.2 # https://github.com/gotcha/ipdb 4 - Sphinx==2.4.4 # https://github.com/sphinx-doc/sphinx 5 - sphinx-book-theme==0.3.2 # https://github.com/executablebooks/sphinx-book-theme 6 5 psycopg2-binary==2.8.4 # https://github.com/psycopg/psycopg2 7 6 # Code quality 8 7 # ------------------------------------------------------------------------------