Skip to content

Commit

Permalink
Replace Netlify pull request preview builds with RTD (plone#6030)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevepiercy authored May 20, 2024
1 parent bc9417a commit f03e4b7
Show file tree
Hide file tree
Showing 9 changed files with 162 additions and 345 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/rtd-pr-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# .github/workflows/rtd-pr-preview.yml
name: readthedocs/actions
on:
pull_request_target:
types:
- opened
# Execute this action only on PRs that touch
# documentation files.
# paths:
# - "docs/**"

permissions:
pull-requests: write

jobs:
documentation-links:
runs-on: ubuntu-latest
steps:
- uses: readthedocs/actions/preview@v1
with:
project-slug: "volto"
single-version: "true"
34 changes: 34 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
nodejs: "20"
jobs:
post_install:
# Install dependencies defined in your ``package.json``
# - npm ci
# Install any other extra dependencies to build the docs
- npm install -g pnpm@latest
- pnpm install
- pnpm build:registry
- (cd packages/volto && pnpm build-storybook -o ${READTHEDOCS_OUTPUT}/html/storybook)
- make rtd-pr-preview
# commands:
# - make rtd-pr-preview

# Build documentation in the "docs/" directory with Sphinx
#sphinx:
# configuration: docs/conf.py

# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
#python:
# install:
# - requirements: docs/requirements.txt
10 changes: 4 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,10 @@ docs-vale: bin/python docs-news ## Install (once) and run Vale style, grammar,
@echo
@echo "Vale is finished; look for any errors in the above output."

.PHONY: netlify
netlify:
pnpm build:registry
(cd packages/volto && pnpm build-storybook -o ../../_build/html/storybook)
pwd && pip install -r requirements-docs.txt
cd $(DOCS_DIR) && pwd && sphinx-build -b html $(ALLSPHINXOPTS) ../$(BUILDDIR)/html
.PHONY: rtd-pr-preview
rtd-pr-preview:
pip install -r requirements-docs.txt
cd $(DOCS_DIR) && sphinx-build -b html $(ALLSPHINXOPTS) ${READTHEDOCS_OUTPUT}/html/

.PHONY: docs-test
docs-test: docs-clean docs-linkcheckbroken docs-vale ## Clean docs build, then run linkcheckbroken, vale
Expand Down
246 changes: 0 additions & 246 deletions docs/source/_static/custom.css

This file was deleted.

2 changes: 1 addition & 1 deletion docs/source/backend/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ myst:
# Integration with the backend

Integration with the Plone CMS is provided by the Plone API framework, namely [`plone.restapi`](https://github.com/plone/plone.restapi) and its lower-level [`plone.rest`](https://github.com/plone/plone.rest).
For details, check the {doc}`plone.restapi/docs/source/index` documentation.
For details, check the {doc}`plone:plone.restapi/docs/source/index` documentation.

Some of the more interesting integration features that you can look up in the `plone.restapi` documentation include the following.

Expand Down
Loading

0 comments on commit f03e4b7

Please sign in to comment.