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

fix: move docs requirements to poetry #1220

Merged
merged 1 commit into from
Aug 31, 2024
Merged
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
15 changes: 9 additions & 6 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ on:
paths:
- 'docs/**'
- '.github/workflows/documentation.yml'
- 'requirements.docs.txt'
- 'Dockerfile.docs'
- 'mkdocs.yml'
- 'CNAME'
push:
Expand All @@ -21,8 +19,6 @@ on:
paths:
- 'docs/**'
- '.github/workflows/documentation.yml'
- 'requirements.docs.txt'
- 'Dockerfile.docs'
- 'mkdocs.yml'
- 'CNAME'

Expand All @@ -34,8 +30,15 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
- run: pip install --upgrade pip && pip install -r requirements.docs.txt
- name: Install poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v5
with:
cache: 'poetry'
- name: Install libraries dependencies
run: |
poetry install --only docs
- run: mkdocs build
- name: Deploy docs
if: github.event_name != 'pull_request' && github.ref_name == github.event.repository.default_branch
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test-build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ on:
paths-ignore:
- 'docs/**'
- '.github/workflows/documentation.yml'
- 'requirements.docs.txt'
- 'mkdocs.yml'
- 'CNAME'
- 'Dockerfile.docs'

release:
types: [created]
Expand All @@ -27,10 +25,8 @@ on:
paths-ignore:
- 'docs/**'
- '.github/workflows/documentation.yml'
- 'requirements.docs.txt'
- 'mkdocs.yml'
- 'CNAME'
- 'Dockerfile.docs'

jobs:
lint:
Expand Down
6 changes: 0 additions & 6 deletions Dockerfile.docs

This file was deleted.

8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,8 @@ format_codestyle:

.PHONY: local_serve_documentation
local_serve_documentation:
docker build -f Dockerfile.docs --no-cache -t kapitan-docs .
docker run --rm -v $(PWD):/docs -p 8000:8000 kapitan-docs
poetry run mike serve

.PHONY: mkdocs_gh_deploy
mkdocs_gh_deploy: # to run locally assuming git ssh access
docker build -f Dockerfile.docs --no-cache -t kapitan-docs .
docker run --rm -it -v $(PWD):/src -v ~/.ssh:/root/.ssh -w /src kapitan-docs gh-deploy -f ./mkdocs.yml
mkdocs_gh_deploy:
poetry run mike deploy --push dev master
9 changes: 1 addition & 8 deletions docs/pages/contribute/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,4 @@ Submit a PR for our master branch that updates the `.md` file(s). Test how the c

### Submit a PR

Once the above PR has been merged, use `mkdocs gh-deploy` command to push the commit that updates the site content to your own gh-pages branch. Make sure that you already have this gh-pages branch in your fork that is up-to-date with our gh-pages branch such that the two branches share the commit history (otherwise Github would not allow PRs to be created).

```text
# locally, on master branch (which has your updated docs)
COMMIT_MSG="your commit message to replace" make mkdocs_gh_deploy
```

After it's pushed, create a PR that targets our gh-pages branch from your gh-pages branch.
Once the above PR has been merged, our CI will deploy your docs automatically. [![Build and deploy documentation](https://github.com/kapicorp/kapitan/actions/workflows/documentation.yml/badge.svg)](https://github.com/kapicorp/kapitan/actions/workflows/documentation.yml)
Loading
Loading