Skip to content

Commit d5762d9

Browse files
committed
Merge pull request #1253 from UncleGrumpy/fix_doc_branches
Correction to publish_docs workflow for branches The github `actions/checkout@v4` only tracks the current branch, even when `fetch-depth: 0` is used, this causes branch names other than the current one to be missed when creating the html navigation menus. This is solved by adding a step to track all of the remote branches that were fetched during checkout. These changes are made under both the "Apache 2.0" and the "GNU Lesser General Public License 2.1 or later" license terms (dual license). SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
2 parents db19c2c + 2a18e6f commit d5762d9

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

.github/workflows/build-docs.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,14 @@ jobs:
9191
repository: ${{ vars.GITHUB_REPOSITORY }}
9292
fetch-depth: 0
9393

94+
- name: Track all branches
95+
shell: bash
96+
run: |
97+
git config --global --add safe.directory /__w/AtomVM/AtomVM
98+
for branch in `git branch -a | grep "remotes/origin" | grep -v HEAD | grep -v "${{ github.ref_name }}"`; do
99+
git branch --track ${branch#remotes/origin/} $branch
100+
done
101+
94102
- name: Build Site
95103
shell: bash
96104
run: |

.github/workflows/publish-docs.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,14 @@ jobs:
9898
ref: Production
9999
path: /home/runner/work/AtomVM/AtomVM/www
100100

101+
- name: Track all branches
102+
shell: bash
103+
run: |
104+
git config --global --add safe.directory /__w/AtomVM/AtomVM
105+
for branch in `git branch -a | grep "remotes/origin" | grep -v HEAD | grep -v "${{ github.ref_name }}" `; do
106+
git branch --track ${branch#remotes/origin/} $branch
107+
done
108+
101109
- name: Build Site
102110
shell: bash
103111
run: |

doc/conf.py.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ for tag in tag_list:
171171
versions.append(tag.name)
172172
release_list.append(tag.name)
173173

174-
omit_branch_list = ('release-0.5')
174+
omit_branch_list = [ 'release-0.5' ]
175175
branch_list = sorted(repo.branches, key=lambda t: t.commit.committed_datetime)
176176
for branch in branch_list:
177177
if branch.name not in omit_branch_list:

0 commit comments

Comments
 (0)