From dbfa3de5105f63a1c2064ca3756e16fec95b9e55 Mon Sep 17 00:00:00 2001 From: BottlecapDave Date: Sat, 29 Jun 2024 08:31:35 +0100 Subject: [PATCH] docs: Added contributors to generated docs --- .github/workflows/docs.yml | 16 ++++++++++++++-- mkdocs.yml | 5 +++++ requirements.txt | 3 ++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ef09f75..39b0bf8 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -5,6 +5,10 @@ on: paths: - 'mkdocs.yml' - '_docs/**' + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + jobs: build_docs: if: ${{ (github.repository_owner == 'BottlecapDave' && (github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/main')) == false }} @@ -12,6 +16,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 + sparse-checkout: | + _docs - uses: actions/setup-python@v4 with: python-version: 3.x @@ -22,7 +30,7 @@ jobs: path: .cache restore-keys: | mkdocs-material- - - run: pip install mkdocs-material + - run: pip install -r requirements.txt - run: mkdocs build --strict deploy_docs: @@ -33,6 +41,10 @@ jobs: contents: write steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 + sparse-checkout: | + _docs - uses: actions/setup-python@v4 with: python-version: 3.x @@ -43,5 +55,5 @@ jobs: path: .cache restore-keys: | mkdocs-material- - - run: pip install mkdocs-material + - run: pip install -r requirements.txt - run: mkdocs gh-deploy --strict --force diff --git a/mkdocs.yml b/mkdocs.yml index 3e5ee66..cd135a0 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -21,6 +21,11 @@ markdown_extensions: - toc: permalink: "#" +plugins: + - search + - git-authors: + show_email_address: false + theme: name: material features: diff --git a/requirements.txt b/requirements.txt index 1e6ca7f..c57c102 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ mkdocs-material==9.5.1 -mike==2.0.0 \ No newline at end of file +mike==2.0.0 +mkdocs-git-authors-plugin==0.9.0 \ No newline at end of file