From 84e65995f64ebf824ed5f2b49e89e54089ed097f Mon Sep 17 00:00:00 2001 From: Cary Phillips Date: Sun, 10 Mar 2024 22:01:46 -0700 Subject: [PATCH 1/2] Add preview link to readthedocs build to PR description Readthedocs triggers a build on PR, and a link is provided in the PR checks, but it's obscure. This action adds a link to the PR description, but only for PR's that actually modify the website. Signed-off-by: Cary Phillips --- .github/workflows/website_preview_link.yml | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/website_preview_link.yml diff --git a/.github/workflows/website_preview_link.yml b/.github/workflows/website_preview_link.yml new file mode 100644 index 00000000..84600cee --- /dev/null +++ b/.github/workflows/website_preview_link.yml @@ -0,0 +1,35 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright (c) Contributors to the OpenEXR Project. +# +# GitHub Actions workflow file +# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions + +# +# This action adds a link to the PR description pointing to the +# readthedocs build of the website, for PRs that modify the website. +# +# Note that the link is also available in the PR checks, but it gets +# buried among the output of the checks and isn't obvious. +# + +name: Website preview link +on: + pull_request_target: + types: + - opened + paths: + - 'website/**' + +permissions: + pull-requests: write + +jobs: + pull-request-links: + runs-on: ubuntu-latest + steps: + - uses: readthedocs/actions/preview@v1 + with: + project-slug: "openexr" + message-template: "Website preview: {docs-pr-index-url}" + + From 92f01de496a4a45c3a106d9124645249e06c8fe4 Mon Sep 17 00:00:00 2001 From: Cary Phillips Date: Wed, 13 Mar 2024 17:48:02 -0700 Subject: [PATCH 2/2] fix typo: imath instead of openexr Signed-off-by: Cary Phillips --- .github/workflows/website_preview_link.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/website_preview_link.yml b/.github/workflows/website_preview_link.yml index 84600cee..3223f7a8 100644 --- a/.github/workflows/website_preview_link.yml +++ b/.github/workflows/website_preview_link.yml @@ -29,7 +29,7 @@ jobs: steps: - uses: readthedocs/actions/preview@v1 with: - project-slug: "openexr" + project-slug: "imath" message-template: "Website preview: {docs-pr-index-url}"