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

docs: setup mkdocs #414

Merged
merged 16 commits into from
Apr 10, 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
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ concurrency:

env:
STABLE_PYTHON_VERSION: "3.12"
HATCH_VERBOSE: 1
HATCH_VERBOSE: "1"
FORCE_COLOR: "1"
CIBW_BUILD_FRONTEND: build

jobs:
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: docs

on:
push:

env:
STABLE_PYTHON_VERSION: "3.12"
FORCE_COLOR: "1"
HATCH_VERBOSE: "1"

jobs:
build:
name: Build docs

runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.STABLE_PYTHON_VERSION }}
cache: pip

- name: Install Hatch
run: pip install --upgrade hatch

- name: Build docs
run: |
hatch run mkdocs build

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: site

publish:
name: Publish docs

if: github.ref == 'refs/heads/master'

needs: build
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ concurrency:
env:
STABLE_PYTHON_VERSION: "3.12"
PYTEST_ADDOPTS: --color=yes
HATCH_VERBOSE: 1
HATCH_VERBOSE: "1"
FORCE_COLOR: "1"

jobs:
test-container:
Expand Down
16 changes: 15 additions & 1 deletion .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
default: true

# Do not enforce line length
line-length: false

# Adjust list indentation for 4 spaces
list-marker-space:
ul_single: 3
ul_multi: 3
ol_single: 2
ol_multi: 2
line-length: false
ul-indent:
indent: 4

# Require fenced code blocks
code-block-style:
style: fenced

# Disable checking for reference links, as MkDocs generates additional ones that
# are not visible to MarkdownLint.
reference-links-images: false
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ repos:
- id: check-toml
- id: check-xml
- id: check-yaml
exclude: |
(?x)^(
mkdocs.yml
)$

- repo: https://gitlab.com/bmares/check-json5
rev: v1.0.0
Expand Down
Loading
Loading