File tree 2 files changed +13
-1
lines changed
2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -219,6 +219,11 @@ the `with` parameter.
219
219
220
220
Default : ` pr-preview`
221
221
222
+ - `custom-url` : Base URL to use when providing a link to the preview site.
223
+
224
+ Default : Will attempt to calculate the repository's GitHub Pages URL
225
+ (e.g. "rossjrw.github.io").
226
+
222
227
- **(Advanced)** `action`: Determines what this action will do when it is
223
228
executed. Supported values : ` deploy` , `remove`, `none`, `auto`.
224
229
Original file line number Diff line number Diff line change @@ -21,6 +21,10 @@ inputs:
21
21
description : Directory containing files to deploy.
22
22
required : false
23
23
default : .
24
+ custom-url :
25
+ description : Custom pages URL
26
+ required : false
27
+ default : " "
24
28
action :
25
29
description : >
26
30
Determines what this action will do when it is executed. Supported
55
59
pr : ${{ github.event.number }}
56
60
actionref : ${{ github.action_ref }}
57
61
actionrepo : ${{ github.action_repository }}
62
+ customurl : ${{ inputs.custom-url }}
58
63
run : |
59
64
echo "action=$action" >> $GITHUB_ENV
60
65
echo "targetdir=$umbrella/pr-$pr" >> $GITHUB_ENV
63
68
org=$(echo "$GITHUB_REPOSITORY" | cut -d "/" -f 1)
64
69
thirdleveldomain=$(echo "$GITHUB_REPOSITORY" | cut -d "/" -f 2 | cut -d "." -f 1)
65
70
66
- if [ "$org" == "$thirdleveldomain" ]; then
71
+ if [ ! -z "$customurl" ]; then
72
+ pagesurl="$customurl"
73
+ elif [ "$org" == "$thirdleveldomain" ]; then
67
74
pagesurl="${org}.github.io"
68
75
else
69
76
pagesurl=$(echo "$GITHUB_REPOSITORY" | sed 's/\//.github.io\//')
You can’t perform that action at this time.
0 commit comments