Skip to content

Commit ef86dc3

Browse files
committed
fix
1 parent defb93d commit ef86dc3

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

.github/workflows/docs.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,19 @@ jobs:
1313
build:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v4
16+
# Full clone on main/dev so we get version history for documentation
17+
- name: Checkout full history on main/dev
18+
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' }}
19+
uses: actions/checkout@v4
1720
with:
18-
fetch-depth: "${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') ? 0 : 1 }}"
21+
fetch-depth: 0
22+
23+
# Shallow clone (single commit) on all other branches for debugging
24+
- name: Checkout shallow on other branches
25+
if: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/dev' }}
26+
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 1
1929

2030
- name: Set up Python Environment
2131
uses: actions/setup-python@v4
@@ -30,7 +40,7 @@ jobs:
3040
- name: Build HTML docs
3141
working-directory: docs
3242
run: make html
33-
43+
3444
- name: Deploy to GitHub Pages
3545
uses: peaceiris/actions-gh-pages@v4
3646
with:

0 commit comments

Comments
 (0)