From 97caac1f3dd9260b7757024e2886c057e422ec08 Mon Sep 17 00:00:00 2001 From: Winford Date: Sun, 18 Aug 2024 15:32:18 -0700 Subject: [PATCH 1/2] Fix typo in docs/conf.py.in Makes `omit_branch_list` a proper list, so items added in the future will not cause errors. Signed-off-by: Winford --- doc/conf.py.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/conf.py.in b/doc/conf.py.in index d6cdce215..52c6550a5 100644 --- a/doc/conf.py.in +++ b/doc/conf.py.in @@ -171,7 +171,7 @@ for tag in tag_list: versions.append(tag.name) release_list.append(tag.name) -omit_branch_list = ('release-0.5') +omit_branch_list = [ 'release-0.5' ] branch_list = sorted(repo.branches, key=lambda t: t.commit.committed_datetime) for branch in branch_list: if branch.name not in omit_branch_list: From 2a18e6f67d154e56e3ea8dbbda50494f6e396f84 Mon Sep 17 00:00:00 2001 From: Winford Date: Sun, 18 Aug 2024 15:33:50 -0700 Subject: [PATCH 2/2] 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. Signed-off-by: Winford --- .github/workflows/build-docs.yaml | 8 ++++++++ .github/workflows/publish-docs.yaml | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/.github/workflows/build-docs.yaml b/.github/workflows/build-docs.yaml index e2c20908e..ecaf3e5ff 100644 --- a/.github/workflows/build-docs.yaml +++ b/.github/workflows/build-docs.yaml @@ -91,6 +91,14 @@ jobs: repository: ${{ vars.GITHUB_REPOSITORY }} fetch-depth: 0 + - name: Track all branches + shell: bash + run: | + git config --global --add safe.directory /__w/AtomVM/AtomVM + for branch in `git branch -a | grep "remotes/origin" | grep -v HEAD | grep -v "${{ github.ref_name }}"`; do + git branch --track ${branch#remotes/origin/} $branch + done + - name: Build Site shell: bash run: | diff --git a/.github/workflows/publish-docs.yaml b/.github/workflows/publish-docs.yaml index ff8e52f9e..cde1c5242 100644 --- a/.github/workflows/publish-docs.yaml +++ b/.github/workflows/publish-docs.yaml @@ -98,6 +98,14 @@ jobs: ref: Production path: /home/runner/work/AtomVM/AtomVM/www + - name: Track all branches + shell: bash + run: | + git config --global --add safe.directory /__w/AtomVM/AtomVM + for branch in `git branch -a | grep "remotes/origin" | grep -v HEAD | grep -v "${{ github.ref_name }}" `; do + git branch --track ${branch#remotes/origin/} $branch + done + - name: Build Site shell: bash run: |