diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..0a8914b --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,51 @@ +name: Build & Deploy Docs + +on: + workflow_dispatch: + pull_request: + paths: + - 'docs/**' + - 'mkdocs.yml' + push: + branches: + - main + paths: + - 'docs/**' + - 'mkdocs.yml' + +permissions: + contents: read + pages: write + id-token: write + +jobs: + build_mkdocs: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.9' + - name: Install packages with pip + run: pip install mkdocs 'mkdocstrings[python]' + - name: Build with MkDocs + run: mkdocs build --config-file mkdocs.yml + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: site/ + deploy_mkdocs: + if: github.ref == 'refs/heads/main' + needs: build_mkdocs + environment: + name: github-pages + url: https://mkh-user.github.io/graphite + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..0d84540 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,34 @@ +site_name: Graphite Docs +site_url: https://mkh-user.github.io/graphite +repo_url: https://github.com/mkh-user/graphite +repo_name: GitHub +edit_uri: blob/main/docs + +site_description: Online documentation for Graphite +site_author: Mahan Khalili +copyright: Copyright © 2026 Mahan Khalili + +plugins: + - search + - mkdocstrings: + handlers: + # See: https://mkdocstrings.github.io/python/usage/ + python: + options: + docstring_style: sphinx +markdown_extensions: + - admonition + +nav: + - Home: index.md + - Introduction: + - Quick Start: quickstart.md + - Developer Guides: + - Contributing Guide: CONTRIBUTING.md + - Development Setup: development-setup.md + +theme: + name: readthedocs + prev_next_buttons_location: both + +draft_docs: drafts/ \ No newline at end of file