diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..7e6d7b0 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,67 @@ +name: Publish MkDocs site + +on: + push: + branches: + - main + paths: + - 'docs/**' + - 'mkdocs.yml' + - '.github/workflows/pages.yml' + pull_request: + paths: + - 'docs/**' + - 'mkdocs.yml' + - '.github/workflows/pages.yml' + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: github-pages + cancel-in-progress: false + +jobs: + build: + name: Build MkDocs site + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + + - name: Install MkDocs + run: python -m pip install mkdocs + + - name: Build site + run: python -m mkdocs build --strict + + - name: Configure Pages + if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' + uses: actions/configure-pages@v5 + + - name: Upload Pages artifact + if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' + uses: actions/upload-pages-artifact@v3 + with: + path: site + + deploy: + name: Deploy to GitHub Pages + if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy Pages artifact + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.gitignore b/.gitignore index a742227..dc1fe20 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /target/ /dist/ +/site/ diff --git a/docs/img/cass-logo-clear.ico b/docs/img/cass-logo-clear.ico new file mode 100644 index 0000000..a733ad4 Binary files /dev/null and b/docs/img/cass-logo-clear.ico differ diff --git a/docs/img/favicon.ico b/docs/img/favicon.ico new file mode 100644 index 0000000..080e044 Binary files /dev/null and b/docs/img/favicon.ico differ diff --git a/docs/img/logo.png b/docs/img/logo.png new file mode 100644 index 0000000..9ec1d21 Binary files /dev/null and b/docs/img/logo.png differ diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..599b900 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,8 @@ +site_name: Cassady +nav: + - Home: README.md + - Commands: commands.md + - Configuration: configuration.md + - "Providers & Models": providers.md + - "Access & tool safety": access-modes.md + - "Rust embedding": embedding.md