Skip to content

Commit

Permalink
Add preview link to readthedocs build to PR description (#378)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* fix typo: imath instead of openexr

Signed-off-by: Cary Phillips <[email protected]>

---------

Signed-off-by: Cary Phillips <[email protected]>
  • Loading branch information
cary-ilm authored Mar 14, 2024
1 parent 1f167f4 commit 37ff823
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/website_preview_link.yml
Original file line number Diff line number Diff line change
@@ -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: "imath"
message-template: "Website preview: {docs-pr-index-url}"


0 comments on commit 37ff823

Please sign in to comment.