Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8934ea8

Browse files
committed
Add PHP build support with customizable environment variables
1 parentae23433 commit8934ea8

File tree

1 file changed

+42
-1
lines changed

1 file changed

+42
-1
lines changed

‎README.md‎

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,49 @@ This GitHub action's behavior can be customized using following environment vari
8585
| `NODE_BUILD_DIRECTORY` | null | path to valid directory on repository. | Build directory. Generally root directory or directory like frontend. |
8686
| `NODE_BUILD_COMMAND` | null | `npm run build` or similar command. | Command used to to build the dependencies needed on deployment. |
8787
| `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. |
8891

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.
90131

91132
## Server Setup
92133

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp