chore: allow setting manual version when required

This commit is contained in:
Aditya Telange 2022-03-27 19:39:44 +05:30
parent 575cc0ca8c
commit f1296bc29d
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77
2 changed files with 15 additions and 5 deletions

View File

@ -7,6 +7,11 @@ on:
- exampleSite - exampleSite
workflow_dispatch: workflow_dispatch:
# manual run # manual run
inputs:
hugoVersion:
description: "Hugo Version"
required: false
default: "0.83.0"
jobs: jobs:
build: build:
@ -26,7 +31,7 @@ jobs:
- name: Setup hugo - name: Setup hugo
uses: peaceiris/actions-hugo@v2 uses: peaceiris/actions-hugo@v2
with: with:
hugo-version: '0.83.0' hugo-version: "${{ github.event.inputs.hugoVersion }}"
- name: Build - name: Build
run: hugo --buildDrafts --gc --verbose --minify run: hugo --buildDrafts --gc --verbose --minify

View File

@ -3,14 +3,19 @@ name: Build GH-Pages
on: on:
push: push:
paths-ignore: paths-ignore:
- 'images/**' - "images/**"
- 'LICENSE' - "LICENSE"
- 'README.md' - "README.md"
branches: branches:
- master - master
- exampleSite - exampleSite
workflow_dispatch: workflow_dispatch:
# manual run # manual run
inputs:
hugoVersion:
description: "Hugo Version"
required: false
default: "0.83.0"
jobs: jobs:
deploy: deploy:
@ -30,7 +35,7 @@ jobs:
- name: Setup hugo - name: Setup hugo
uses: peaceiris/actions-hugo@v2 uses: peaceiris/actions-hugo@v2
with: with:
hugo-version: '0.83.0' hugo-version: "${{ github.event.inputs.hugoVersion }}"
- name: Build - name: Build
run: hugo --buildDrafts --gc --verbose --minify run: hugo --buildDrafts --gc --verbose --minify