File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -70,10 +70,11 @@ Docker :whale: image is also provided and automatically updated within [Docker H
7070
7171Following inputs can be used as ` step.with` keys
7272
73- | Name | Type | Description |
74- |-----------------|---------|-----------------------------------------------------------------|
75- | `target_branch` | String | Git branch where assets will be deployed (default `gh-pages`) |
76- | `build_dir` | String | Path to build directory to deploy |
73+ | Name | Type | Description |
74+ |-----------------|---------|-----------------------------------------------------------------------------------------|
75+ | `repo` | String | GitHub repository where assets will be deployed. Example : portapps/portapps.github.io |
76+ | `target_branch` | String | Git branch where assets will be deployed (default `gh-pages`) |
77+ | `build_dir` | String | Path to build directory to deploy |
7778
7879# ## environment variables
7980
Original file line number Diff line number Diff line change @@ -7,9 +7,10 @@ branding:
77 icon : ' upload-cloud'
88
99inputs :
10+ repo :
11+ description : ' GitHub repository where assets will be deployed. Example: portapps/portapps.github.io'
1012 target_branch :
1113 description : ' Git branch where assets will be deployed'
12- required : false
1314 default : ' gh-pages'
1415 build_dir :
1516 description : ' Path to build directory to deploy'
Original file line number Diff line number Diff line change 11#! /bin/sh
22set -e
33
4+ REPO=${INPUT_REPO:- $GITHUB_REPOSITORY }
5+
46if [ -z " $INPUT_TARGET_BRANCH " ]; then
57 echo " ⛔️ Target branch not defined"
68 exit 1
@@ -18,7 +20,7 @@ git config user.name "${GITHUB_ACTOR}"
1820git config user.email " ${GITHUB_ACTOR} @users.noreply.github.com"
1921git add .
2022git commit --allow-empty -m ' Deploy to GitHub pages'
21- git push --force --quiet https://${GITHUB_PAT:- " x-access-token:$GITHUB_TOKEN " } @github.com/${GITHUB_REPOSITORY } .git master:${INPUT_TARGET_BRANCH}
23+ git push --force --quiet " https://${GITHUB_PAT:- " x-access-token:$GITHUB_TOKEN " } @github.com/${REPO } .git" " master:${INPUT_TARGET_BRANCH} "
2224rm -rf .git
2325
2426# Tried https://developer.github.com/v3/repos/pages/#request-a-page-build
You can’t perform that action at this time.
0 commit comments