Skip to content

Commit 32e0371

Browse files
authored
Add ReadTheDocs preview workflow (#59)
1 parent f27a88a commit 32e0371

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/rtd-preview.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: RTD Preview
2+
on:
3+
pull_request_target:
4+
types: [opened]
5+
6+
permissions:
7+
pull-requests: write
8+
9+
jobs:
10+
binder:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Comment on the PR with the RTD preview
14+
uses: actions/github-script@v6
15+
with:
16+
github-token: ${{secrets.GITHUB_TOKEN}}
17+
script: |
18+
var PR_NUMBER = context.issue.number
19+
github.rest.issues.createComment({
20+
issue_number: context.issue.number,
21+
owner: context.repo.owner,
22+
repo: context.repo.repo,
23+
body: `[![lite-badge](https://jupyterlite.rtfd.io/en/latest/_static/badge.svg)](https://jupyterlab-filesystem-access--${PR_NUMBER}.org.readthedocs.build/en/${PR_NUMBER}/lite) :point_left: Try it on ReadTheDocs`
24+
})

0 commit comments

Comments
 (0)