diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 09addc1fb59acb4d4dbfc2ad791e1518ef5081b1..c1402af8b4c41da05c599c449b2e0733969af4d1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -85,19 +85,15 @@ create-purge-json: # Add the index-less homepage, with and without trailing slash echo -en "\n \"$CI_PAGES_URL\"" >> purge.json echo -en ",\n \"$CI_PAGES_URL/\"" >> purge.json - # Add all the directories, with and without trailing slash - for d in $(find public/* -type d); do - echo -en ",\n \"$CI_PAGES_URL/${d#public/}\"" >> purge.json - echo -en ",\n \"$CI_PAGES_URL/${d#public/}/\"" >> purge.json - done - # Add all the non-HTML files, with and without trailing slash - for f in $(find public -type f -not -iname '*.html'); do + # Add all the directories, non-HTML files and non-HTML symlinks; with and + # without trailing slash + for f in $(find public \( -type d -or -type f -or -type l \) -not -iname '*.html'); do echo -en ",\n \"$CI_PAGES_URL/${f#public/}\"" >> purge.json echo -en ",\n \"$CI_PAGES_URL/${f#public/}/\"" >> purge.json done - # Add all the HTML files, with and without trailing slash. First with file - # extension, then without - for f in $(find public -type f -iname '*.html'); do + # Add all the HTML files and HTML symlinks, with and without trailing + # slash. First with file extension, then without + for f in $(find public \( -type f -or -type l \) -iname '*.html'); do echo -en ",\n \"$CI_PAGES_URL/${f#public/}\"" >> purge.json echo -en ",\n \"$CI_PAGES_URL/${f#public/}/\"" >> purge.json f="${f%.html}"