Skip to content

Commit 1d9538b

Browse files
authored
fix(docs): update nightly docs release workflow to commit to next (#17016)
update nightly docs release workflow to commit the nightly version directly to `next`. This PR also updates the `docs/update_versions.sh` script and corresponding barretenberg/docs script to error on failure instead of committing an empty versions.json file.
2 parents e7120f2 + c005053 commit 1d9538b

File tree

3 files changed

+23
-19
lines changed

3 files changed

+23
-19
lines changed

.github/workflows/nightly-docs-release.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,6 @@ jobs:
117117
run: |
118118
./update_versions.sh
119119
120-
- name: Commit new Aztec Docs version
121-
run: |
122-
git add .
123-
git commit -m "chore(docs): cut new aztec docs version for tag ${{ env.NIGHTLY_TAG }}"
124-
git push
125-
126120
- name: Cleanup Barretenberg docs nightly versions
127121
working-directory: ./barretenberg/docs
128122
run: |
@@ -150,8 +144,18 @@ jobs:
150144
run: |
151145
./update_versions.sh
152146
153-
- name: Commit new Aztec Docs version
147+
- name: Commit new Aztec and Barretenberg Docs version
154148
run: |
149+
# Stash the docs changes
150+
git add .
151+
git stash push --staged -m "nightly docs for ${{ env.NIGHTLY_TAG }}"
152+
153+
# Checkout the next branch
154+
git fetch origin next
155+
git checkout next
156+
157+
# Apply the stashed changes and commit
158+
git stash pop
155159
git add .
156-
git commit -m "chore(docs): cut new aztec docs version for tag ${{ env.NIGHTLY_TAG }}"
157-
git push
160+
git commit -m "chore(docs): cut new aztec and bb docs version for tag ${{ env.NIGHTLY_TAG }}"
161+
git push origin next

barretenberg/docs/scripts/update_versions.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ if [ -d "$VERSIONED_DOCS_DIR" ]; then
7272
echo "Found $STABLE_COUNT stable version(s)"
7373
fi
7474
else
75-
# No versions found, create empty array
76-
echo "[]" > "$VERSIONS_FILE"
77-
echo "No versions found in versioned_docs"
75+
# No versions found, exit with error
76+
echo "Error: No versions found in versioned_docs" >&2
77+
exit 1
7878
fi
7979
else
80-
echo "Warning: $VERSIONED_DOCS_DIR not found"
81-
echo "[]" > "$VERSIONS_FILE"
80+
echo "Error: $VERSIONED_DOCS_DIR not found" >&2
81+
exit 1
8282
fi
8383

8484
echo "Current versions.json:"

docs/scripts/update_versions.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ if [ -d "$VERSIONED_DOCS_DIR" ]; then
7272
echo "Found $STABLE_COUNT stable version(s)"
7373
fi
7474
else
75-
# No versions found, create empty array
76-
echo "[]" > "$VERSIONS_FILE"
77-
echo "No versions found in versioned_docs"
75+
# No versions found, exit with error
76+
echo "Error: No versions found in versioned_docs" >&2
77+
exit 1
7878
fi
7979
else
80-
echo "Warning: $VERSIONED_DOCS_DIR not found"
81-
echo "[]" > "$VERSIONS_FILE"
80+
echo "Error: $VERSIONED_DOCS_DIR not found" >&2
81+
exit 1
8282
fi
8383

8484
echo "Current versions.json:"

0 commit comments

Comments
 (0)