Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions build-site.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
19 changes: 19 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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"
+++
+++