Skip to content

Commit

Permalink
Limit to docs download when docs folder is present
Browse files Browse the repository at this point in the history
  • Loading branch information
minottic committed Nov 12, 2024
1 parent cc24a28 commit 678c2a4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions .github/actions/mkdocs-pages/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,24 @@ 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:
sparse-checkout: .github
- 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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compose_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCS_LINK_CHECK: true
TAG: ${{ github.sha }}
path: docs
docs_folder: ''
test:
runs-on: ubuntu-latest
needs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mkdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
push: true
path: docs
docs_folder: ''

0 comments on commit 678c2a4

Please sign in to comment.