HydeCLI #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated by ChatGPT | |
name: HydeCLI | |
on: | |
workflow_dispatch: | |
inputs: | |
command: | |
type: choice | |
description: 'Select a command to execute' | |
options: | |
- php hyde list | |
- php hyde build | |
- php hyde rebuild | |
- php hyde validate | |
- php hyde build:rss | |
- php hyde build:search | |
- php hyde build:sitemap | |
- php hyde make:page | |
- php hyde make:post | |
- php hyde publish:configs | |
- php hyde publish:homepage | |
- php hyde publish:views | |
- php hyde route:list | |
- php hyde torchlight:install | |
- php hyde vendor:publish | |
required: true | |
arguments: | |
description: 'Optional arguments to append to the command' | |
required: false | |
jobs: | |
execute_command: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Composer install | |
run: composer install | |
- name: Execute command | |
run: | | |
# Parse command input | |
command="${{ github.event.inputs.command }}" | |
arguments="${{ github.event.inputs.arguments }}" | |
# Combine command with arguments | |
full_command="${command} ${arguments}" | |
# Execute the command | |
echo "Executing command: $full_command" | |
$full_command |