Skip to content

Commit 31cf10b

Browse files
authored
fix(docs): parse default documentation version (#1245)
1 parent eadb161 commit 31cf10b

4 files changed

Lines changed: 11 additions & 2 deletions

File tree

‎.github/scripts/create-latest-alias.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ latest_path=""
88

99
for version_file in "$versions_dir"/*.yml; do
1010
candidate=$(awk '
11-
$1 == "path:" {
11+
/^path:/ {
1212
path = $2
1313
gsub(/^"|"$/, "", path)
1414
}
15-
$1 == "defaultVersion:" && $2 == "true" {
15+
/^defaultVersion:/ && $2 == "true" {
1616
default_version = 1
1717
}
1818
END {

‎.github/scripts/test-create-latest-alias.sh‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ EOF
1818
cat > "$versions_dir/1.5.0.Final.yml" <<'EOF'
1919
path: "1_5_0_Final"
2020
defaultVersion: true
21+
menu:
22+
- title: "Javadoc"
23+
path: "/apidocs/"
2124
EOF
2225

2326
"$script_dir/create-latest-alias.sh" "$versions_dir" "$site_dir"

‎.github/workflows/check-site.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
pull_request:
55
paths:
66
- docs/**
7+
- .github/scripts/**
8+
- .github/workflows/check-site.yml
9+
- .github/workflows/deploy-site.yml
710

811
jobs:
912
build:
@@ -17,6 +20,7 @@ jobs:
1720
with:
1821
site-directory: ./docs/
1922
github-pages: 'false'
23+
site-url: https://a2aproject.github.io/a2a-java
2024
- name: Verify latest documentation alias
2125
run: |
2226
.github/scripts/create-latest-alias.sh docs/data/versions docs/target/roq

‎.github/workflows/deploy-site.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
branches: [ main ] # Switch to the branch which should be deployed to GitHub Pages
66
paths:
77
- docs/**
8+
- .github/scripts/**
9+
- .github/workflows/deploy-site.yml
810
workflow_dispatch:
911

1012
jobs:

0 commit comments

Comments
 (0)