diff --git a/build-site.sh b/build-site.sh index ec799cadfa7b..7b4a8460b184 100755 --- a/build-site.sh +++ b/build-site.sh @@ -1,13 +1,22 @@ #!/bin/bash +if [[ -z "${DEPLOY_PRIME_URL}" ]]; then + USE_BASE_URL_SITE="" + USE_BASE_URL_SITE_DOCS="" +else + echo -e "\033[0;32mNetlify DEPLOY_PRIME_URL detected, this seems to be a PR, deployment happening at ${DEPLOY_PRIME_URL}...\033[0m" + USE_BASE_URL_SITE="-b ${DEPLOY_PRIME_URL}" + USE_BASE_URL_DOCS="-b ${DEPLOY_PRIME_URL}/documentation" +fi + echo -e "\033[0;32mDeleting Hugo previously generated directories for docs and main site...\033[0m" rm -rf site_source_files/public && rm -rf docs_source_files/public echo -e "\033[0;32mGenerating Hugo site for docs...\033[0m" -cd docs_source_files && hugo && cd .. +cd docs_source_files && hugo --minify ${URL_BASE_DOCS} && cd .. echo -e "\033[0;32mGenerating Hugo site for main website...\033[0m" -cd site_source_files && hugo && cd .. +cd site_source_files && hugo --minify ${URL_BASE_SITE} && cd .. echo -e "\033[0;32mMerging both sites into a single one...\033[0m" mv docs_source_files/public/* site_source_files/public/documentation diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 000000000000..ec9c13e2f173 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,19 @@ +[build] +publish = "site_source_files/public" +command = "chmod +x build-site.sh && ./build-site.sh" + +[context.production.environment] +HUGO_VERSION = "0.66.0" +HUGO_ENV = "production" + +[context.deploy-preview] +command = "chmod +x build-site.sh && ./build-site.sh" + +[context.deploy-preview.environment] +HUGO_VERSION = "0.66.0" + +[context.branch-deploy] +command = "chmod +x build-site.sh && ./build-site.sh" + +[context.branch-deploy.environment] +HUGO_VERSION = "0.66.0" diff --git a/site_source_files/content/downloads/C#.md b/site_source_files/content/downloads/c_sharp.md similarity index 99% rename from site_source_files/content/downloads/C#.md rename to site_source_files/content/downloads/c_sharp.md index 230d9fd43a4b..5115f7a8cc02 100755 --- a/site_source_files/content/downloads/C#.md +++ b/site_source_files/content/downloads/c_sharp.md @@ -10,4 +10,4 @@ DownloadLink = "https://goo.gl/uJJ5Sc" AlphaDownloadLink = "https://www.nuget.org/api/v2/package/Selenium.WebDriver/4.0.0-alpha05" ChangelogLink = "https://raw.githubusercontent.com/SeleniumHQ/selenium/trunk/dotnet/CHANGELOG" DocsLink = "https://goo.gl/uutZjZ" -+++ \ No newline at end of file ++++