From c393fcd0dd560d41a9bc50edeba160a7117f01e0 Mon Sep 17 00:00:00 2001 From: Matthieu Thiboust <14574229+mthiboust@users.noreply.github.com> Date: Thu, 23 Nov 2023 21:52:22 +0100 Subject: [PATCH] docs: adds mkdocs --- .github/workflows/docs.yml | 29 +++++++++++++++++++++++++++++ docs/index.md | 17 +++++++++++++++++ mkdocs.yml | 4 ++++ pyproject.toml | 3 +++ 4 files changed, 53 insertions(+) create mode 100644 .github/workflows/docs.yml create mode 100644 docs/index.md create mode 100644 mkdocs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..df0b460 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,29 @@ +name: ci +on: + push: + branches: + - master + - main +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 14574229+github-actions[bot]@users.noreply.github.com + - 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 diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..000ea34 --- /dev/null +++ b/docs/index.md @@ -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. diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..d0823d7 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,4 @@ +site_name: Somap + +theme: + name: material diff --git a/pyproject.toml b/pyproject.toml index db619b7..d86b431 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,6 +49,9 @@ dev = [ "pytest>=7.4.3", "ruff>=0.1.5", ] +docs = [ + "mkdocs-material>=9.4.11", +] [build-system] requires = ["pdm-backend"]