forked from readthedocs/actions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yaml
More file actions
52 lines (48 loc) · 1.62 KB
/
action.yaml
File metadata and controls
52 lines (48 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: "Read the Docs Pull Request Preview"
author: "@readthedocs"
description: "Update PR description with a link to the rendered version of the documentation on Read the Docs"
branding:
color: gray
icon: robot
inputs:
project-slug:
description: "Project's slug on Read the Docs"
required: true
project-language:
description: "Project's language on Read the Docs"
default: "en"
required: false
message-template:
description: "Template message to use for the PR body"
default: |
---
:books: Documentation preview :books:: {docs-pr-index-url}
required: false
platform:
description: "Read the Docs Community or Read the Docs for Business (community or business)"
default: "community"
required: false
single-version:
description: "Site is a single version project, so link to the top level."
default: 'false'
required: false
runs:
using: "composite"
steps:
- uses: actions/checkout@v3
with:
repository: "readthedocs/actions"
ref: "v1"
- name: "Comment on Pull Request with Read the Docs' preview links"
uses: actions/github-script@v6
with:
script: |
const inputs = {
"project-slug": "${{ inputs.project-slug }}",
"project-language": "${{ inputs.project-language }}",
"message-template": `${{ inputs.message-template }}`,
"platform": "${{ inputs.platform }}",
"single-version": "${{ inputs.single-version }}",
}
const script = require("./preview/scripts/edit-description.js");
await script({inputs, github, context});