Add target_branch input

This commit is contained in:
CrazyMax 2019-08-31 23:28:00 +02:00
parent 4baa844a73
commit cbda6a2f37
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7
2 changed files with 12 additions and 4 deletions

View File

@ -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

View File

@ -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'