@@ -85,8 +85,49 @@ This GitHub action's behavior can be customized using following environment vari
85
85
| `NODE_BUILD_DIRECTORY` | null | path to valid directory on repository. | Build directory. Generally root directory or directory like frontend. |
86
86
| `NODE_BUILD_COMMAND` | null | `npm run build` or similar command. | Command used to to build the dependencies needed on deployment. |
87
87
| `NODE_BUILD_SCRIPT` | null | path to valid shell script | Custom or predefined script to run after compilation. |
88
+ | `PHP_BUILD_DIRECTORY` | null | Path to valid directory | Directory to run PHP build commands/scripts in. |
89
+ | `PHP_BUILD_COMMAND` | null | Any shell command | Command to run for building PHP dependencies or other PHP build steps. |
90
+ | `PHP_BUILD_SCRIPT` | null | Path to valid shell script | Custom or predefined script to run for PHP build steps. |
88
91
89
- All node related variables are completely optional. You can use them if your site needs to have node dependencies built.
92
+ All node and php related variables are completely optional. You can use them if your site needs to have such dependencies built.
93
+
94
+ # ## PHP Build Support
95
+
96
+ You can now run custom PHP build steps before deployment by setting the following environment variables in your workflow :
97
+
98
+ ` ` ` yaml
99
+ env:
100
+ PHP_VERSION: "8.1"
101
+ PHP_BUILD_DIRECTORY: "./"
102
+ PHP_BUILD_COMMAND: "composer install --no-dev"
103
+ PHP_BUILD_SCRIPT: "./scripts/php-build.sh"
104
+ ` ` `
105
+
106
+ - `PHP_VERSION` : Installs the specified PHP version before running build steps.
107
+ - `PHP_BUILD_DIRECTORY` : Directory to change into before running build commands/scripts.
108
+ - `PHP_BUILD_COMMAND` : Shell command to run for PHP build (e.g., `composer install`).
109
+ - `PHP_BUILD_SCRIPT` : Path to a shell script to execute for PHP build steps.
110
+
111
+ # ## Node Build Support
112
+
113
+ You can also run custom Node.js build steps before deployment by setting the following environment variables in your workflow :
114
+
115
+ ` ` ` yaml
116
+ env:
117
+ NODE_VERSION: "20"
118
+ NPM_VERSION: "10"
119
+ NODE_BUILD_DIRECTORY: "./frontend"
120
+ NODE_BUILD_COMMAND: "npm run build"
121
+ NODE_BUILD_SCRIPT: "./scripts/node-build.sh"
122
+ ` ` `
123
+
124
+ - `NODE_VERSION` : Installs the specified Node.js version before running build steps.
125
+ - `NPM_VERSION` : Installs the specified npm version (defaults to latest if not set).
126
+ - `NODE_BUILD_DIRECTORY` : Directory to change into before running build commands/scripts.
127
+ - `NODE_BUILD_COMMAND` : Shell command to run for Node.js build (e.g., `npm run build`).
128
+ - `NODE_BUILD_SCRIPT` : Path to a shell script to execute for Node.js build steps.
129
+
130
+ These steps will be executed before PHP build steps.
90
131
91
132
# # Server Setup
92
133
0 commit comments