You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+1-3
Original file line number
Diff line number
Diff line change
@@ -74,9 +74,7 @@ There are a few more configuration options available, that can be supplied to th
74
74
| `framework-version` | Specify the HydePHP Framework version to use<br><small>(only applicable for [anonymous projects](https://hydephp.github.io/action/#anonymous-projects))</small> | "latest" |
75
75
| `directory` | The directory to use as the project root | none |
76
76
| `config` | String of lines to add to the `hyde.yml` config file | none |
77
-
| `env-site-name` | Set the `SITE_NAME` environment variable | _none_ |
78
-
| `env-site-url` | Set the `SITE_URL` environment variable | _none_ |
79
-
| `env-torchlight-token` | Set the `TORCHLIGHT_TOKEN` environment variable | _none_ |
77
+
| `env` | List of environment variables to set in the format `NAME=value` | _none_ |
Copy file name to clipboardexpand all lines: docs/index.md
+18-16
Original file line number
Diff line number
Diff line change
@@ -217,6 +217,24 @@ See the [HydePHP documentation](https://hydephp.com/docs/1.x/customization#yaml-
217
217
218
218
>warning If your inputs contain sensitive information, you should use [GitHub Secrets](https://docs.github.com/en/actions/reference/encrypted-secrets) to store them.
219
219
220
+
#### `env`
221
+
222
+
You can set arbitrary environment variables using the `env` input. Simply provide each variable in KEY=VALUE format, one per line:
223
+
224
+
```yaml
225
+
- uses: hydephp/action@master
226
+
with:
227
+
deploy-to: "pages"
228
+
env: |
229
+
SITE_NAME=My Site
230
+
SITE_URL=https://example.com
231
+
TORCHLIGHT_TOKEN=${{ secrets.TORCHLIGHT_TOKEN }}
232
+
```
233
+
234
+
The environment variables will be available during the build process. Note that if you're using sensitive information, you should use GitHub Secrets instead of hardcoding the values. Also make sure your input is valid "dotenv" syntax.
235
+
236
+
### Deprecated inputs
237
+
220
238
You can also pass set the following inputs to be passed as environment variables for the build process:
221
239
222
240
#### `env-site-name`
@@ -236,19 +254,3 @@ Sets the `SITE_URL` environment variable
236
254
> Deprecated: Use the `env` input instead with `TORCHLIGHT_TOKEN=value`
237
255
238
256
Sets the `TORCHLIGHT_TOKEN` environment variable
239
-
240
-
#### `env`
241
-
242
-
You can set arbitrary environment variables using the `env` input. Simply provide each variable in KEY=VALUE format, one per line:
243
-
244
-
```yaml
245
-
- uses: hydephp/action@master
246
-
with:
247
-
deploy-to: "pages"
248
-
env: |
249
-
SITE_NAME=My Site
250
-
SITE_URL=https://example.com
251
-
TORCHLIGHT_TOKEN=${{ secrets.TORCHLIGHT_TOKEN }}
252
-
```
253
-
254
-
The environment variables will be available during the build process. Note that if you're using sensitive information, you should use GitHub Secrets instead of hardcoding the values. Also make sure your input is valid "dotenv" syntax.
0 commit comments