diff --git a/bin/osuny.js b/bin/osuny.js index ee4bcbc1b4532beb4c9ccdf4f3b4fe331db469c9..ae7ed8de293f0d9b3f6ca537e5afee5fef6fac59 100644 --- a/bin/osuny.js +++ b/bin/osuny.js @@ -30,8 +30,8 @@ let pagefindExclude = ` .events__section, .block-agenda, .organizations__section, .block-organizations, .pages__section, .block-pages, - .persons__section, .block-persons, - .posts__section, .block-posts, .post-sidebar, + .persons__section, .block-persons, + .posts__section, .block-posts, .post-sidebar, .programs__section, .block-programs, .researchers__term, .teachers__term @@ -50,7 +50,6 @@ if (command === "dev") { execute("hugo"); execute("npx pagefind --site 'public' --output-subdir '../static/pagefind' --exclude-selectors '" + pagefindExclude + "'"); execute("hugo server"); - } if (command === "build") { @@ -59,6 +58,12 @@ if (command === "build") { execute("npm_config_yes=true npx pagefind --site 'public' --exclude-selectors '" + pagefindExclude + "'"); } +if (command === "percy-build") { + execute("yarn upgrade"); + execute("hugo --baseURL=/"); + execute("npm_config_yes=true npx pagefind --site 'public' --exclude-selectors '" + pagefindExclude + "'"); +} + if (command === "update") { execute("git pull --recurse-submodules --depth 1"); execute("git submodule update --remote");