From 22e22bf51be369c411c0544cb7ca89a93bbddd2b Mon Sep 17 00:00:00 2001 From: choldgraf Date: Wed, 17 Apr 2024 10:11:13 -0700 Subject: [PATCH] Add execution to our documentation --- .github/robots.txt | 5 +++++ .github/workflows/docs.yml | 0 .readthedocs.yaml | 6 +++++- docs/execute-notebooks.md | 2 ++ 4 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .github/robots.txt create mode 100644 .github/workflows/docs.yml diff --git a/.github/robots.txt b/.github/robots.txt new file mode 100644 index 000000000..07bea694b --- /dev/null +++ b/.github/robots.txt @@ -0,0 +1,5 @@ +# This should disallow all search index crawling of the documentation. +# we are using RTD *only* for PR previews, and not for hosting the actual docs. +# So this should be added to the HTML output within readthedocs. +User-agent: * +Disallow: / \ No newline at end of file diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000..e69de29bb diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 73b97211c..322f7f793 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -1,3 +1,5 @@ +# ReadTheDocs configuration structure +# ref: https://docs.readthedocs.io/en/stable/config-file/v2.html version: 2 build: os: ubuntu-lts-latest @@ -8,9 +10,11 @@ build: - npm run build - npm run --workspace packages/mystmd link - myst --version - - cd docs && BASE_URL=${READTHEDOCS_CANONICAL_URL} myst build --html + - cd docs && BASE_URL=${READTHEDOCS_CANONICAL_URL} myst build --html --execute # TODO: Switch to rsync # https://github.com/readthedocs/readthedocs.org/issues/11219 # - /usr/bin/rsync -a --mkpath docs/_build/ $READTHEDOCS_OUTPUT/ - mkdir -p $READTHEDOCS_OUTPUT - cp -a docs/_build/* $READTHEDOCS_OUTPUT/ + # Copy robots.txt to avoid search indexing + - cp .github/robots.txt $READTHEDOCS_OUTPUT/robots.txt diff --git a/docs/execute-notebooks.md b/docs/execute-notebooks.md index b87fa8514..152440b9e 100644 --- a/docs/execute-notebooks.md +++ b/docs/execute-notebooks.md @@ -66,3 +66,5 @@ By default MyST caches the execution of a notebook according to its executable c ```bash myst clean --execute ``` + +{eval}`2 + 2