From be5f97ce7d44413d573e30154552560a82fee66a Mon Sep 17 00:00:00 2001 From: Carlo Minotti <50220438+minottic@users.noreply.github.com> Date: Wed, 13 Nov 2024 10:39:31 +0100 Subject: [PATCH] Limit to docs download when docs folder is present (#360) --- .github/actions/mkdocs-pages/action.yaml | 12 ++++++------ .github/workflows/compose_test.yaml | 4 ++-- .github/workflows/mkdocs.yaml | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/actions/mkdocs-pages/action.yaml b/.github/actions/mkdocs-pages/action.yaml index a5a48652..9dd89c35 100644 --- a/.github/actions/mkdocs-pages/action.yaml +++ b/.github/actions/mkdocs-pages/action.yaml @@ -18,15 +18,15 @@ inputs: description: if to publish docs to gh-pages type: string default: '' - path: - description: relative path under $GITHUB_WORKSPACE to checkout root + docs_folder: + description: docs folder path. If empty, it checkouts all to a fresh 'docs' type: string - default: '' + default: docs runs: using: composite steps: - - if: ${{ inputs.path }} + - if: ${{ !inputs.docs_folder }} name: Checkout CI uses: actions/checkout@v4 with: @@ -34,8 +34,8 @@ runs: - name: Checkout root uses: actions/checkout@v4 with: - path: ${{ inputs.path }} - sparse-checkout: ${{ inputs.path && '.' || '' }} + path: ${{ inputs.docs_folder && '' || 'docs' }} + sparse-checkout: ${{ inputs.docs_folder }} - name: Set up Python uses: actions/setup-python@v5 with: diff --git a/.github/workflows/compose_test.yaml b/.github/workflows/compose_test.yaml index bc6a85b4..5ef6cb5f 100644 --- a/.github/workflows/compose_test.yaml +++ b/.github/workflows/compose_test.yaml @@ -92,12 +92,12 @@ jobs: && !cancelled() && fromJson(needs.changes.outputs.all).docs_all_modified_files steps: - - uses: SciCatProject/scicatlive/.github/actions/mkdocs-pages@main + - uses: SciCatProject/scicatlive/.github/actions/mkdocs-pages@tree_files with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} DOCS_LINK_CHECK: true TAG: ${{ github.sha }} - path: docs + docs_folder: '' test: runs-on: ubuntu-latest needs: diff --git a/.github/workflows/mkdocs.yaml b/.github/workflows/mkdocs.yaml index 4e3fce4a..97c74c35 100644 --- a/.github/workflows/mkdocs.yaml +++ b/.github/workflows/mkdocs.yaml @@ -15,4 +15,4 @@ jobs: with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} push: true - path: docs + docs_folder: ''