Skip to content

Commit bf710a5

Browse files
committed
Add versioning
1 parent 63de02a commit bf710a5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/nextjs.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
latest_mapping = {minor: sorted(minor_to_patches[minor], key=version_key)[-1] for minor in minors}
8282
8383
# Output latest minor
84-
latest = minors[-1] if minors else ''
84+
latest = [*latest_mapping.values()][-1] if minors else ''
8585
print(f"latest={latest}")
8686
with open(os.environ['GITHUB_OUTPUT'], 'a') as f:
8787
f.write(f"latest={latest}\n")
@@ -179,6 +179,13 @@ jobs:
179179
- name: List all aggregated sites
180180
run: ls -l
181181

182+
- name: Rename to minor versions
183+
run: |
184+
for dir in docs-${{ github.run_id }}-*; do
185+
version=$(echo $dir | sed -E 's/docs-[0-9]+-(v[0-9]+\.[0-9]+)\.[0-9]+/\1/')
186+
mv "$dir" "$version"
187+
done
188+
182189
- name: Update latest
183190
run: cp -r ${{ needs.define-matrix.outputs.latest }} .
184191

0 commit comments

Comments
 (0)