diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml new file mode 100644 index 0000000..dafbe0b --- /dev/null +++ b/.github/workflows/deploy_docs.yml @@ -0,0 +1,29 @@ +name: Deploy Docs + +on: + push: + branches: [main] + pull_request: + +permissions: + contents: write + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v6 + + - name: Test that docs build without error + if: github.event_name == 'pull_request' + run: uv run --extra docs mkdocs build --strict + + + - name: Deploy docs to GitHub Pages + if: github.event_name == 'push' + run: uv run --extra docs mkdocs gh-deploy --strict --force \ No newline at end of file diff --git a/.gitignore b/.gitignore index b336e63..a6b8acf 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,6 @@ wheels/ .venv # uv -uv.lock \ No newline at end of file +uv.lock + +site/ \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..ab4c1e5 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,21 @@ +# Welcome to MkDocs + +For full documentation visit [mkdocs.org](https://www.mkdocs.org). + +## Hello URSSI + +## What's up? + +## 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..9b89f49 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,4 @@ +site_name: URSSI Package Documentation +site_url: https://timmonko.github.io/urssi-package/ +theme: + name: material diff --git a/pyproject.toml b/pyproject.toml index 2f6d93c..e2fd6b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,6 +23,9 @@ examples = [ "matplotlib", "scikit-image[data]", ] +docs = [ + "mkdocs-material", +] [project.urls] "Homepage" = "https://github.com/timmonko/urssi-package"