Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): separate docs dependencies #1453

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ on:
push:
branches:
- "main"
- "develop"
- "release/**"
pull_request:
branches:
- "main"
- "develop"
- "release/**"
jobs:
deploy:
runs-on: ubuntu-22.04
Expand All @@ -20,20 +17,18 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: 3.12
- name: install deps
uses: ./.github/actions/cached-ui-deps
- name: Build Storybook
run: |
cd ui
yarn run build-storybook --quiet --output-dir ../docs/storybook/
cd ../
- run: |
curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1
poetry install
- run: pip install -r docs/requirements-docs.txt
- name: Deploy to GitHub Pages
if: github.ref_name == 'main'
run: poetry run mkdocs gh-deploy --force --strict
run: mkdocs gh-deploy --force --strict
- name: Build Docs
if: github.ref_name != 'main'
run: poetry run mkdocs build --strict
run: mkdocs build --strict
5 changes: 4 additions & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ Documentation changes are also welcome!
To verify changes locally:

```bash
poetry run mkdocs serve -a localhost:8001
python3 -m venv .venv
Copy link
Contributor

@vtsvetkov-splunk vtsvetkov-splunk Nov 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it not mess up venv for docs and venv for the rest of the repo? I consider moving everything related to docs to docs/, including (or only?) mkdocs.yml

Then we can create .python-version file that can be picked up by pyenv and github action and have the docs/venv for better isolation

What do you think?

source .venv/bin/activate
pip install -r docs/requirements-docs.txt
mkdocs serve -a localhost:8081
```

## Issues and bug reports
Expand Down
4 changes: 4 additions & 0 deletions docs/requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
mkdocs==1.6.1
mkdocs-material==9.5.44
mkdocstrings[python]==0.27.0
mkdocs-print-site-plugin==2.6.0
Loading
Loading