From cbda6a2f37a83a585cadb1ec924fcf66290ab7e5 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 31 Aug 2019 23:28:00 +0200 Subject: [PATCH] Add target_branch input --- README.md | 11 +++++++---- action.yml | 5 +++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cfc5beb..de8c49d 100644 --- a/README.md +++ b/README.md @@ -40,8 +40,10 @@ jobs: EOL - name: Deploy + if: success() uses: crazy-max/ghaction-github-pages@master with: + target_branch: gh-pages build_dir: public env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -51,11 +53,12 @@ jobs: ### inputs -The following are **required** as `step.with` keys +Following inputs can be used as `step.with` keys -| Name | Type | Description | -|-------------|---------|-----------------------------------------------------------------| -| `build_dir` | String | Path to build directory to deploy | +| Name | Type | Description | +|-----------------|---------|-----------------------------------------------------------------| +| `target_branch` | String | Git branch where assets will be deployed (default `gh-pages`) | +| `build_dir` | String | Path to build directory to deploy | ### environment variables diff --git a/action.yml b/action.yml index a29773c..4907f83 100644 --- a/action.yml +++ b/action.yml @@ -7,6 +7,10 @@ branding: icon: 'git-branch' inputs: + target_branch: + description: 'Git branch where assets will be deployed' + required: false + default: 'gh-pages' build_dir: description: 'Path to build directory to deploy' required: true @@ -15,6 +19,7 @@ runs: using: 'docker' image: 'Dockerfile' args: + - ${{ inputs.target_branch }} - ${{ inputs.build_dir }} env: GITHUB_TOKEN: 'As provided by GitHub Actions'