Unverified Commit 8f9c4bb4 authored by Maxime Lefrançois's avatar Maxime Lefrançois
Browse files

keep backup

parent 4ca85daf
Loading
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -106,3 +106,13 @@ website:publish:
      artifacts: true
  script:
    - mv portal/target/site ~/site
    - |
      TARGET=~/site
      if [ -d "$TARGET" ]; then
        MODDATE=$(date -r "$TARGET" +%Y%m%d-%H%M%S)
        mv "$TARGET" "${TARGET}-${MODDATE}"
        echo "Existing site backed up to ${TARGET}-${MODDATE}"
      fi
      mkdir -p "$TARGET"
      mv portal/target/site ~/site "$TARGET"
      echo "Fresh site copied to $TARGET"
 No newline at end of file