|
63 | 63 |
|
64 | 64 | - name: Copy Javadoc into versioned folder |
65 | 65 | run: | |
66 | | - TAG="${GITHUB_REF_NAME}" |
| 66 | + # TAG="${GITHUB_REF_NAME}" |
| 67 | + TAG="9.0.0-rc" |
67 | 68 | VERSION_DIR="docs/${TAG}" |
68 | 69 |
|
69 | 70 | rm -rf "gh-pages/${VERSION_DIR}" |
@@ -121,74 +122,74 @@ jobs: |
121 | 122 | git commit -m "Update release Javadoc for ${GITHUB_REF_NAME}" |
122 | 123 | git push origin gh-pages |
123 | 124 |
|
124 | | - delete-tag-docs: |
125 | | - name: Remove deleted tag docs |
126 | | - runs-on: ubuntu-latest |
127 | | - |
128 | | - if: github.event_name == 'delete' && github.event.ref_type == 'tag' |
129 | | - |
130 | | - steps: |
131 | | - - name: Checkout gh-pages |
132 | | - uses: actions/checkout@v5 |
133 | | - with: |
134 | | - ref: gh-pages |
135 | | - path: gh-pages |
136 | | - |
137 | | - - name: Remove documentation for deleted tag |
138 | | - run: | |
139 | | - TAG="${GITHUB_REF_NAME}" |
140 | | - VERSION_DIR="docs/${TAG}" |
141 | | - rm -rf "gh-pages/${VERSION_DIR}" |
142 | | -
|
143 | | - - name: Rebuild index.html |
144 | | - run: | |
145 | | - cd gh-pages |
146 | | -
|
147 | | - # Regenerate index.html (same as above) |
148 | | - cat > index.html << 'EOF' |
149 | | - <!DOCTYPE html> |
150 | | - <html> |
151 | | - <head> |
152 | | - <meta charset="UTF-8"/> |
153 | | - <title>Javadoc Versions</title> |
154 | | - <style> |
155 | | - body { font-family: Arial; padding: 2rem; max-width: 800px; margin: auto; } |
156 | | - h1 { font-size: 2rem; } |
157 | | - ul { line-height: 1.8; font-size: 1.1rem; } |
158 | | - </style> |
159 | | - </head> |
160 | | - <body> |
161 | | - <h1>Available Javadoc Versions</h1> |
162 | | - <ul> |
163 | | - EOF |
164 | | -
|
165 | | - for dir in docs/*; do |
166 | | - [ -d "$dir" ] || continue |
167 | | - ver=$(basename "$dir") |
168 | | - echo "<li><a href=\"docs/$ver/\">$ver</a></li>" >> index.html |
169 | | - done |
170 | | -
|
171 | | - cat >> index.html << 'EOF' |
172 | | - </ul> |
173 | | - </body> |
174 | | - </html> |
175 | | - EOF |
176 | | -
|
177 | | - - name: Commit & push removal |
178 | | - run: | |
179 | | - cd gh-pages |
180 | | - git config user.email "github-actions[bot]@users.noreply.github.com" |
181 | | - git config user.name "github-actions[bot]" |
182 | | -
|
183 | | - if git diff --quiet; then |
184 | | - echo "No changes to commit" |
185 | | - exit 0 |
186 | | - fi |
187 | | -
|
188 | | - git add . |
189 | | - git commit -m "Remove Javadoc for deleted tag ${GITHUB_REF_NAME}" |
190 | | - git push origin gh-pages |
191 | | -
|
| 125 | +# delete-tag-docs: |
| 126 | +# name: Remove deleted tag docs |
| 127 | +# runs-on: ubuntu-latest |
| 128 | +# |
| 129 | +# if: github.event_name == 'delete' && github.event.ref_type == 'tag' |
| 130 | +# |
| 131 | +# steps: |
| 132 | +# - name: Checkout gh-pages |
| 133 | +# uses: actions/checkout@v5 |
| 134 | +# with: |
| 135 | +# ref: gh-pages |
| 136 | +# path: gh-pages |
| 137 | +# |
| 138 | +# - name: Remove documentation for deleted tag |
| 139 | +# run: | |
| 140 | +# TAG="${GITHUB_REF_NAME}" |
| 141 | +# VERSION_DIR="docs/${TAG}" |
| 142 | +# rm -rf "gh-pages/${VERSION_DIR}" |
| 143 | +# |
| 144 | +# - name: Rebuild index.html |
| 145 | +# run: | |
| 146 | +# cd gh-pages |
| 147 | +# |
| 148 | +# # Regenerate index.html (same as above) |
| 149 | +# cat > index.html << 'EOF' |
| 150 | +# <!DOCTYPE html> |
| 151 | +# <html> |
| 152 | +# <head> |
| 153 | +# <meta charset="UTF-8"/> |
| 154 | +# <title>Javadoc Versions</title> |
| 155 | +# <style> |
| 156 | +# body { font-family: Arial; padding: 2rem; max-width: 800px; margin: auto; } |
| 157 | +# h1 { font-size: 2rem; } |
| 158 | +# ul { line-height: 1.8; font-size: 1.1rem; } |
| 159 | +# </style> |
| 160 | +# </head> |
| 161 | +# <body> |
| 162 | +# <h1>Available Javadoc Versions</h1> |
| 163 | +# <ul> |
| 164 | +# EOF |
| 165 | +# |
| 166 | +# for dir in docs/*; do |
| 167 | +# [ -d "$dir" ] || continue |
| 168 | +# ver=$(basename "$dir") |
| 169 | +# echo "<li><a href=\"docs/$ver/\">$ver</a></li>" >> index.html |
| 170 | +# done |
| 171 | +# |
| 172 | +# cat >> index.html << 'EOF' |
| 173 | +# </ul> |
| 174 | +# </body> |
| 175 | +# </html> |
| 176 | +# EOF |
| 177 | +# |
| 178 | +# - name: Commit & push removal |
| 179 | +# run: | |
| 180 | +# cd gh-pages |
| 181 | +# git config user.email "github-actions[bot]@users.noreply.github.com" |
| 182 | +# git config user.name "github-actions[bot]" |
| 183 | +# |
| 184 | +# if git diff --quiet; then |
| 185 | +# echo "No changes to commit" |
| 186 | +# exit 0 |
| 187 | +# fi |
| 188 | +# |
| 189 | +# git add . |
| 190 | +# git commit -m "Remove Javadoc for deleted tag ${GITHUB_REF_NAME}" |
| 191 | +# git push origin gh-pages |
| 192 | +# |
192 | 193 | # Summary of Features |
193 | 194 | # Multi-version docs (docs/<tag>/) |
194 | 195 | # Auto-generated index.html |
|
0 commit comments