Skip to content

Commit 7274960

Browse files
committed
docs: simplify CUSTOM_BUILD_COMMAND docs
1 parent a1fb642 commit 7274960

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

README.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,24 +53,13 @@ Oryx, Azure's build system, may attempt to build your application with an EOL ve
5353
}
5454
```
5555

56-
### CUSTOM_BUILD_COMMAND
56+
### CUSTOM_BUILD_COMMAND considerations
5757

58-
If `CUSTOM_BUILD_COMMAND` is not provided to the github action, the [azure swa github action](https://docs.microsoft.com/en-us/azure/static-web-apps/build-configuration?tabs=github-actions) runs the following (as of 03.03.2025)
59-
60-
```yaml
61-
npm install # this could lead to differences in final used dependencies
62-
npm run build
63-
npm run build:azure # Although according to docs "...the workflow tries to run the npm run build or npm run build:azure commands"
64-
npm install # in build/server
65-
```
66-
67-
If you wish to control that `npm ci` is executed instead of `npm install`, define the `CUSTOM_BUILD_COMMAND` environment variable for the build in combination with `skip_api_build: true`. In this case you will need to execute `npm install` in the `build/server` directory with api functions manually.
58+
If you are setting a [`CUSTOM_BUILD_COMMAND`](https://github.com/microsoft/Oryx/blob/main/doc/configuration.md) in your build pipeline to customize how the API is built (e.g. to run `npm ci` instead of `npm install`), make sure to run `npm install` inside the API directory to install production dependencies. Otherwise, the SvelteKit render function will not be able to start up.
6859

6960
```yaml
7061
...
7162
env:
72-
# npm install in build/server should be executed manually
73-
# or execute npm ci before this action
7463
CUSTOM_BUILD_COMMAND: "npm ci && npm run build && npm install --prefix ./build/server --omit=dev"
7564
with:
7665
skip_api_build: true

0 commit comments

Comments
 (0)