diff --git a/docusaurus.config.js b/docusaurus.config.js index 2133a7d356..39ab54bb7c 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -8,6 +8,11 @@ const editUrl = { editUrl: "https://github.com/conda-forge/conda-forge.github.io/tree/main/", }; +var copyright = `Copyright © ${new Date().getFullYear()} conda-forge · Built with Docusaurus`; +if (process.env.NETLIFY) { + copyright += ` · Deployed on Netlify`; +} + /** @type {import('@docusaurus/types').Config} */ const config = { title: "conda-forge | community-driven packaging for conda", @@ -360,7 +365,7 @@ const config = { ], }, ], - copyright: `Copyright © ${new Date().getFullYear()} conda-forge · Built with Docusaurus`, + copyright: copyright, }, prism: { theme: lightCodeTheme, diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000000..078ab5e6e0 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,20 @@ +[build] + # Directory (relative to root of your repo) that contains the deploy-ready + # HTML files and assets generated by the build. If a base directory has + # been specified, include it in the publish directory path. + publish = "build" + + # Default build command. + command = """ + curl -L -o miniforge.sh https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh && + bash miniforge.sh -bfp ~/miniforge && + rm -rf miniforge.sh && + source ~/miniforge/etc/profile.d/conda.sh && + conda env create -f .ci_scripts/environment.yml && + conda activate conda-forge-docs && + ./.ci_scripts/update_docs + """ + + # We only want to build PR previews. + # Exit code == 0 means that the build is ignored. + ignore = 'test "$PULL_REQUEST" == "false"'