generated from hydephp/hyde
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (53 loc) · 1.64 KB
/
cli.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Generated by ChatGPT (No copyright claimed)
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
- name: Commit changes
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git add .
git commit -m "Commit changes from HydeCLI command"
git push