Skip to content

Commit bdee40f

Browse files
authored
[skip-ci] put pack the last working version (#19736)
1 parent 97d09a6 commit bdee40f

File tree

1 file changed

+13
-61
lines changed

1 file changed

+13
-61
lines changed

.github/workflows/root-docs-ci.yml

Lines changed: 13 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ jobs:
186186
run: |
187187
pwd
188188
ls -l
189-
aws s3 sync --delete ${DOC_DIR}/html/ s3://root/doc/${WEB_DIR_NAME}/
190-
aws s3 sync --delete ${DOC_DIR}/ s3://root/doc/${WEB_DIR_NAME}/ --exclude "${DOC_DIR}/html/*"
189+
aws s3 sync ${DOC_DIR}/html/ s3://root/doc/${WEB_DIR_NAME}/
190+
aws s3 sync ${DOC_DIR}/ s3://root/doc/${WEB_DIR_NAME}/ --exclude "${DOC_DIR}/html/*"
191191
aws s3 cp ${TAR_NAME}.gz s3://root/download/
192192
193193
- name: Install Kerberos utilities
@@ -213,66 +213,18 @@ jobs:
213213
run: |
214214
echo ${RWEBEOS_KT} | base64 -d > ${KT_FILE_NAME}
215215
kinit -p ${{ secrets.KRB5USER }}@${{ secrets.KRB5REALM }} -kt ${KT_FILE_NAME}
216-
217-
EOS_HOST=${EOS_ENDPOINT#root://}
218-
TMP_DIR=${EOS_BASE_PATH}/doc/${WEB_DIR_NAME}_tmp
219-
OLD_DIR=${EOS_BASE_PATH}/doc/${WEB_DIR_NAME}_old
220-
FINAL_DIR=${EOS_BASE_PATH}/doc/${WEB_DIR_NAME}
221-
222-
# Recursive cleanup function that ignores EOS special directories
223-
cleanup_dir() {
224-
local dir="$1"
225-
if xrdfs "${EOS_HOST}" stat "${dir}" >/dev/null 2>&1; then
226-
for f in $(xrdfs "${EOS_HOST}" ls "${dir}" 2>/dev/null); do
227-
# Skip EOS special directories
228-
if [[ "$f" == *.sys* ]]; then
229-
echo "Skipping special EOS directory: $f"
230-
continue
231-
fi
232-
# Recurse into directories
233-
if xrdfs "${EOS_HOST}" stat "$f" 2>/dev/null | grep -q '^Directory:'; then
234-
cleanup_dir "$f"
235-
else
236-
echo "Removing file: $f"
237-
xrdfs "${EOS_HOST}" rm "$f" || true
238-
fi
239-
done
240-
xrdfs "${EOS_HOST}" rmdir "${dir}" || true
241-
fi
242-
}
243-
244-
# Clean temporary directory
245-
cleanup_dir "${TMP_DIR}"
246-
247-
# Ensure tmp dir exists on EOS
248-
xrdfs "${EOS_HOST}" mkdir -p "${TMP_DIR}"
249-
250-
# Upload documentation files (with / final so EOS sees directory)
251216
cd ${DOC_DIR}/html/
252-
xrdcp --parallel 64 -f ./*.html ${EOS_ENDPOINT}/${TMP_DIR}/ || true
253-
xrdcp --parallel 64 -f ./*.svg ${EOS_ENDPOINT}/${TMP_DIR}/ || true
254-
xrdcp --parallel 64 -f ./*.map ${EOS_ENDPOINT}/${TMP_DIR}/ || true
255-
xrdcp --parallel 64 -f ./*.md5 ${EOS_ENDPOINT}/${TMP_DIR}/ || true
256-
257-
# Upload entire folder content
258-
xrdcp --parallel 64 -rf ./ ${EOS_ENDPOINT}/${TMP_DIR}/
259-
217+
xrdcp --parallel 64 -rf ./*.html ${EOS_ENDPOINT}/${EOS_BASE_PATH}/doc/${WEB_DIR_NAME}
218+
rm -rf *.html
219+
xrdcp --parallel 64 -rf ./*.svg ${EOS_ENDPOINT}/${EOS_BASE_PATH}/doc/${WEB_DIR_NAME}
220+
rm -rf *.svg
221+
xrdcp --parallel 64 -rf ./*.map ${EOS_ENDPOINT}/${EOS_BASE_PATH}/doc/${WEB_DIR_NAME}
222+
rm -rf *.map
223+
xrdcp --parallel 64 -rf ./*.md5 ${EOS_ENDPOINT}/${EOS_BASE_PATH}/doc/${WEB_DIR_NAME}
224+
rm -rf *.md5
225+
xrdcp --parallel 64 -rf ./ ${EOS_ENDPOINT}/${EOS_BASE_PATH}/doc/${WEB_DIR_NAME}
260226
cd ..
261227
rm -r html
262-
xrdcp --parallel 64 -rf ./ ${EOS_ENDPOINT}/${TMP_DIR}/
228+
xrdcp --parallel 64 -rf ./ ${EOS_ENDPOINT}/${EOS_BASE_PATH}/doc/${WEB_DIR_NAME}
263229
cd ..
264-
265-
# Remove previous backup
266-
cleanup_dir "${OLD_DIR}"
267-
268-
# Rename current live directory to old
269-
xrdfs "${EOS_HOST}" mv "${FINAL_DIR}" "${OLD_DIR}" || true
270-
271-
# Rename temporary directory to live
272-
xrdfs "${EOS_HOST}" mv "${TMP_DIR}" "${FINAL_DIR}"
273-
274-
# Delete the old directory after successful swap
275-
cleanup_dir "${OLD_DIR}"
276-
277-
# Upload tar.gz archive
278-
xrdcp -f ${TAR_NAME}.gz ${EOS_ENDPOINT}/${EOS_BASE_PATH}/download/
230+
xrdcp -rf ${TAR_NAME}.gz ${EOS_ENDPOINT}/${EOS_BASE_PATH}/download

0 commit comments

Comments
 (0)