Skip to content

Commit

Permalink
Restore pull request previews on Read the Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
stevepiercy committed Jan 22, 2025
1 parent 3ce6176 commit 761b0d5
Showing 1 changed file with 22 additions and 24 deletions.
46 changes: 22 additions & 24 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,25 @@ build:
tools:
python: "3.12"
nodejs: "20"
jobs:
post_checkout:
# Cancel building pull requests when there aren't changes in the docs directory or YAML file.
# You can add any other files or directories that you'd like here as well,
# like your docs requirements file, or other files that will change your docs build.
#
# If there are no changes (git diff exits with 0) we force the command to return with 183.
# This is a special exit code on Read the Docs that will cancel the build immediately.
- |
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/main -- docs/ .readthedocs.yaml requirements-docs.txt packages/volto/.storybook;
then
exit 183;
fi
post_install:
# Install dependencies defined in your ``package.json``
# - npm ci
# Install any other extra dependencies to build the docs
- corepack enable
- corepack prepare pnpm@* --activate
- asdf reshim nodejs
- pnpm install
- pnpm build:registry
- (cd packages/volto && pnpm build-storybook -o ${READTHEDOCS_OUTPUT}/html/storybook)
- make docs-rtd-pr-preview
commands:
# Cancel building pull requests when there aren't changes in the docs directory or YAML file.
# You can add any other files or directories that you'd like here as well,
# like your docs requirements file, or other files that will change your docs build.
#
# If there are no changes (git diff exits with 0) we force the command to return with 183.
# This is a special exit code on Read the Docs that will cancel the build immediately.
- |
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/main -- docs/ .readthedocs.yaml requirements-docs.txt packages/volto/.storybook;
then
exit 183;
fi
# Install dependencies defined in your ``package.json``
# - npm ci
# Install any other extra dependencies to build the docs
- corepack enable
- corepack prepare pnpm@* --activate
- asdf reshim nodejs
- pnpm install
- pnpm build:registry
- (cd packages/volto && pnpm build-storybook -o ${READTHEDOCS_OUTPUT}/html/storybook)
- make docs-rtd-pr-preview

0 comments on commit 761b0d5

Please sign in to comment.