Skip to content

Commit

Permalink
created base for documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
attila-balint-kul committed Nov 30, 2023
1 parent 4d249ef commit 1e970ce
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish documentation 📚 to GitHub Pages

on:
push:
branches:
- main
- docs/init

permissions:
contents: write

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ venv.bak/
.ropeproject

# mkdocs documentation
/site
docs/site/

# mypy
.mypy_cache/
Expand Down
17 changes: 17 additions & 0 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Welcome to MkDocs

For full documentation visit [mkdocs.org](https://www.mkdocs.org).

## Commands

* `mkdocs new [dir-name]` - Create a new project.
* `mkdocs serve` - Start the live-reloading docs server.
* `mkdocs build` - Build the documentation site.
* `mkdocs -h` - Print help message and exit.

## Project layout

mkdocs.yml # The configuration file.
docs/
index.md # The documentation homepage.
... # Other markdown pages, images and other files.
3 changes: 3 additions & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
site_name: My Docs
theme:
name: material
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ all = [
"typing",
]

[tool.hatch.envs.docs]
detached = true
dependencies = [
"mkdocs-material>=9.4.0",
]
[tool.hatch.envs.docs.scripts]
build = "mkdocs build -f docs/mkdocs.yml"
serve = "mkdocs serve -f docs/mkdocs.yml"

[tool.black]
target-version = ["py310"]
Expand Down

0 comments on commit 1e970ce

Please sign in to comment.