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 EOL
- -
name: Deploy name: Deploy
if: success()
uses: crazy-max/ghaction-github-pages@master uses: crazy-max/ghaction-github-pages@master
with: with:
target_branch: gh-pages
build_dir: public build_dir: public
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -51,10 +53,11 @@ jobs:
### inputs ### inputs
The following are **required** as `step.with` keys Following inputs can be used as `step.with` keys
| Name | Type | Description | | 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 | | `build_dir` | String | Path to build directory to deploy |
### environment variables ### environment variables

View File

@ -7,6 +7,10 @@ branding:
icon: 'git-branch' icon: 'git-branch'
inputs: inputs:
target_branch:
description: 'Git branch where assets will be deployed'
required: false
default: 'gh-pages'
build_dir: build_dir:
description: 'Path to build directory to deploy' description: 'Path to build directory to deploy'
required: true required: true
@ -15,6 +19,7 @@ runs:
using: 'docker' using: 'docker'
image: 'Dockerfile' image: 'Dockerfile'
args: args:
- ${{ inputs.target_branch }}
- ${{ inputs.build_dir }} - ${{ inputs.build_dir }}
env: env:
GITHUB_TOKEN: 'As provided by GitHub Actions' GITHUB_TOKEN: 'As provided by GitHub Actions'