9999 }
100100 check_environment
101101
102- - name : Set variables
103- id : vars
104- shell : bash -x -e -u -o pipefail {0}
105- env :
106- VERSION : ${{ inputs.publish-version }}
107- run : |
108- echo "version=$VERSION" >> $GITHUB_OUTPUT
109-
110- echo "publish_latest=false" >> $GITHUB_OUTPUT
111- PUBLISH_LATEST=false
112-
113- echo "::notice:: Publish latest: ${PUBLISH_LATEST}"
114-
115102 - name : Normalize S3 paths
116103 id : paths
117104 env :
@@ -157,14 +144,14 @@ runs:
157144 }
158145
159146 - name : Publish versioned docs
160- if : ${{ steps.vars.outputs. version != '' && inputs.dry-run == 'false' }}
147+ if : ${{ inputs.publish- version != '' && inputs.dry-run == 'false' }}
161148 id : publish_version
162149 shell : bash -x -e -u -o pipefail {0}
163150 working-directory : ${{ inputs.artifacts-path }}
164151 env :
165152 S3_ROOT : ${{ steps.paths.outputs.s3_root }}
166153 S3_PATH : ${{ steps.paths.outputs.s3_path }}
167- VERSION : ${{ steps.vars.outputs. version }}
154+ VERSION : ${{ inputs.publish- version }}
168155 run : |
169156 echo "Syncing artifacts to versioned directory: ${VERSION}"
170157 aws s3 sync . "${S3_ROOT}/${S3_PATH}/${VERSION}" --exclude .buildinfo --exclude .doctrees --delete
@@ -179,20 +166,6 @@ runs:
179166
180167 echo "published=true" >> $GITHUB_OUTPUT
181168
182- - name : Publish latest docs
183- if : ${{ steps.vars.outputs.publish_latest == 'true' && inputs.dry-run == 'false' }}
184- id : publish_latest
185- shell : bash -x -e -u -o pipefail {0}
186- working-directory : ${{ inputs.artifacts-path }}
187- env :
188- S3_ROOT : ${{ steps.paths.outputs.s3_root }}
189- S3_PATH : ${{ steps.paths.outputs.s3_path }}
190- run : |
191- echo "Syncing artifacts to latest directory"
192- aws s3 sync . "${S3_ROOT}/${S3_PATH}/latest" --exclude .buildinfo --exclude .doctrees --delete
193-
194- echo "published=true" >> $GITHUB_OUTPUT
195-
196169 - name : Flush Akamai cache
197170 id : akamai-flush
198171 shell : bash -x -e -u -o pipefail {0}
@@ -252,10 +225,9 @@ runs:
252225 - name : Summary
253226 if : always()
254227 env :
255- VERSION : ${{ steps.vars.outputs. version }}
228+ VERSION : ${{ inputs.publish- version }}
256229 S3_PATH : ${{ steps.paths.outputs.s3_path }}
257230 PUBLISHED_VERSION : ${{ steps.publish_version.outputs.published || 'false' }}
258- PUBLISHED_LATEST : ${{ steps.publish_latest.outputs.published || 'false' }}
259231 CACHE_FLUSHED : ${{ steps.akamai-flush.outputs.flush_success || 'false' }}
260232 shell : bash -x -e -u -o pipefail {0}
261233 run : |
@@ -268,11 +240,6 @@ runs:
268240 if [[ "${PUBLISHED_VERSION}" == "true" ]]; then
269241 echo "- ✅ **Version:** \`${VERSION}\` → \`s3://.../${S3_PATH}/${VERSION}\`" >> $GITHUB_STEP_SUMMARY
270242 fi
271- if [[ "${PUBLISHED_LATEST}" == "true" ]]; then
272- echo "- ✅ **Latest:** \`${VERSION}\` → \`s3://.../${S3_PATH}/latest\` (updated to match release)" >> $GITHUB_STEP_SUMMARY
273- else
274- echo "- ⏭️ **Latest:** not updated (manual dispatch or /not-latest flag)" >> $GITHUB_STEP_SUMMARY
275- fi
276243 if [[ "${PUBLISHED_VERSION}" == "false" ]] && [[ "${PUBLISHED_LATEST}" == "false" ]]; then
277244 echo "- ⚠️ No documentation was published" >> $GITHUB_STEP_SUMMARY
278245 fi
0 commit comments