Separate docs environment (#1600)

* Separate env for docs
This commit is contained in:
Ayaz Salikhov
2022-02-04 15:45:26 +03:00
committed by GitHub
parent 68d640f997
commit f32be5097a
9 changed files with 15 additions and 12 deletions

View File

@@ -66,7 +66,7 @@ jobs:
- name: Install Dev Dependencies - name: Install Dev Dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
make -C main dev-env make -C main install-dev-env
- name: Build Docker Images - name: Build Docker Images
run: make -C main build-all run: make -C main build-all

View File

@@ -83,7 +83,7 @@ jobs:
- name: Install Dev Dependencies - name: Install Dev Dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
make -C main dev-env make -C main install-dev-env
- name: Build Docker Images - name: Build Docker Images
run: make -C main build-all-multi run: make -C main build-all-multi

View File

@@ -7,7 +7,7 @@ on:
- "docs/**" - "docs/**"
- ".readthedocs.yaml" - ".readthedocs.yaml"
- "requirements-dev.txt" - "requirements-docs.txt"
push: push:
branches: branches:
- main - main
@@ -17,7 +17,7 @@ on:
- "docs/**" - "docs/**"
- ".readthedocs.yaml" - ".readthedocs.yaml"
- "requirements-dev.txt" - "requirements-docs.txt"
workflow_dispatch: workflow_dispatch:
jobs: jobs:
@@ -39,7 +39,7 @@ jobs:
- name: Install Dev Dependencies - name: Install Dev Dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
make dev-env make install-docs-env
- name: Build Documentation - name: Build Documentation
run: make docs run: make docs

View File

@@ -27,4 +27,4 @@ sphinx:
# Optionally declare the Python requirements required to build your docs # Optionally declare the Python requirements required to build your docs
python: python:
install: install:
- requirements: requirements-dev.txt - requirements: requirements-docs.txt

View File

@@ -132,7 +132,7 @@ dev/%: PORT?=8888
dev/%: ## run a foreground container for a stack dev/%: ## run a foreground container for a stack
docker run -it --rm -p $(PORT):8888 $(DARGS) $(OWNER)/$(notdir $@) docker run -it --rm -p $(PORT):8888 $(DARGS) $(OWNER)/$(notdir $@)
dev-env: ## install libraries required to build docs and run tests install-dev-env: ## install libraries required to build images and run tests
@pip install -r requirements-dev.txt @pip install -r requirements-dev.txt
@@ -140,6 +140,9 @@ dev-env: ## install libraries required to build docs and run tests
docs: ## build HTML documentation docs: ## build HTML documentation
sphinx-build docs/ docs/_build/ sphinx-build docs/ docs/_build/
install-docs-env: ## install libraries required to build docs
@pip install -r requirements-docs.txt
hook/%: WIKI_PATH?=../wiki hook/%: WIKI_PATH?=../wiki

View File

@@ -13,7 +13,7 @@ This can be achieved by using the generic task used to install all Python develo
```sh ```sh
# Install all development dependencies for the project # Install all development dependencies for the project
make dev-env make install-dev-env
# It can also be installed directly # It can also be installed directly
pip install pre-commit pip install pre-commit
``` ```

View File

@@ -24,7 +24,7 @@ Pushing `Run Workflow` button will trigger this process.
## Adding a New Core Image to Docker Hub ## Adding a New Core Image to Docker Hub
```{note} ```{note}
In general, we do not add new core images and ask contributors to either create a [recipe](../using/recipes.md) or [community stack](../using/stacks.md). In general, we do not add new core images and ask contributors to either create a [recipe](../using/recipes.md) or [community stack](../contributing/stacks.md).
``` ```
When there's a new stack definition, do the following before merging the PR with the new stack: When there's a new stack definition, do the following before merging the PR with the new stack:

View File

@@ -1,10 +1,7 @@
docker docker
myst-parser
packaging packaging
plumbum plumbum
pre-commit pre-commit
pytest pytest
requests requests
sphinx
sphinx-copybutton
tabulate tabulate

3
requirements-docs.txt Normal file
View File

@@ -0,0 +1,3 @@
myst-parser
sphinx
sphinx-copybutton