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
Which folder do you want your GitHub Page to use as root directory of deployment, after the build process. Simply it is your build output directory such as `./dist`. If your `vite` config exports to a folder other than `./dist`, then you should pass it as parameter.
160
+
161
+
#### :warning: `build_path` works along with `working_path` [see section](#working_path)
162
+
163
+
Here's how `build_path` is resolved and utilized while working along `working_path` parameter.
164
+
165
+
- If `build_path` is an absolute path (e.g: `build_path: /some-folder/sub-folder`, then it is used as is
166
+
- Keep in mind this absolute path is really absolute, `/` doesn't point to repository root, it points to
167
+
- If `build_path` is NOT an absolute path
168
+
- If `working_path: ./` (default value) then use `build_path` as is
169
+
- If `working_path` is NOT the default value (repository root), then combine `working_path` and `build_path` and use it as build directory.
170
+
171
+
See the examples below to understand how it is resolved.
172
+
173
+
<details>
174
+
175
+
<summary><b>Example-1: Standard repository</b></summary>
176
+
177
+
178
+
#### Example-1: Standard repository
179
+
180
+
---
181
+
182
+
```
183
+
.
184
+
├── src/
185
+
├── dist/ (doesn't exist in repository, created during build)
186
+
├── package.json
187
+
├── package-lock.json
188
+
├── docs/
189
+
└── README.md
190
+
```
191
+
192
+
Then you don't have to configure any parameters for the action. This is the default setup with the following default parameter values:
193
+
- `build_path: ./dist`
194
+
- `working_path: ./`
195
+
- Resolved build output folder: `./dist`
196
+
197
+
---
198
+
199
+
200
+
</details>
201
+
202
+
203
+
<details>
204
+
205
+
<summary><b>Example-2: All code related files reside under a folder</b></summary>
206
+
207
+
---
208
+
209
+
#### Example-2: All code related files reside under a folder
210
+
211
+
```
212
+
.
213
+
├── app/
214
+
│ └── src/
215
+
│ └── dist/ (doesn't exist in repository, created during build)
216
+
│ └── package.json
217
+
│ └── package-lock.json
218
+
└── docs/
219
+
└── README.md
220
+
```
221
+
222
+
Pass the following parameters:
223
+
```yml
224
+
- name: Deploy to Github Pages
225
+
uses: skywarth/vite-github-pages-deployer@master
226
+
id: deploy_to_pages
227
+
with:
228
+
working_path: ./app
229
+
```
230
+
- With this setup, the resolved build output folder is: `./app/dist`
231
+
232
+
---
233
+
234
+
</details>
235
+
236
+
237
+
<details>
238
+
239
+
<summary><b> Example-3: All code related files reside under a folder, with a custom build folder name</b></summary>
240
+
241
+
#### Example-3: All code related files reside under a folder, with a custom build folder name
242
+
243
+
---
244
+
245
+
```
246
+
.
247
+
├── app/
248
+
│ └── src/
249
+
│ └── my_custom_build_folder/ (doesn't exist in repository, created during build)
250
+
│ └── package.json
251
+
│ └── package-lock.json
252
+
└── docs/
253
+
└── README.md
254
+
```
255
+
256
+
Pass the following parameters:
257
+
```yml
258
+
- name: Deploy to Github Pages
259
+
uses: skywarth/vite-github-pages-deployer@master
260
+
id: deploy_to_pages
261
+
with:
262
+
working_path: ./app
263
+
build_path: my_custom_build_folder
264
+
```
265
+
- With this setup, the resolved build output folder is: `./app/my_custom_build_folder`
266
+
267
+
---
268
+
269
+
</details>
270
+
271
+
272
+
<details>
273
+
274
+
<summary><b> Example-4: All code related files reside under a folder, except the build folder, with a custom build folder name</b></summary>
275
+
276
+
#### Example-4: All code related files reside under a folder, except the build folder, with a custom build folder name
277
+
278
+
---
279
+
280
+
```
281
+
.
282
+
├── app/
283
+
│ └── src/
284
+
│ └── package.json
285
+
│ └── package-lock.json
286
+
└── deploy/
287
+
└── docs/
288
+
└── README.md
289
+
```
290
+
291
+
Pass the following parameters:
292
+
```yml
293
+
- name: Deploy to Github Pages
294
+
uses: skywarth/vite-github-pages-deployer@master
295
+
id: deploy_to_pages
296
+
with:
297
+
working_path: ./app
298
+
build_path: ../deploy
299
+
```
300
+
- With this setup, the resolved build output folder is: `./deploy`, because `./app/../deploy`
301
+
302
+
---
303
+
304
+
</details>
305
+
306
+
307
+
308
+
157
309
158
-
Which folder do you want your GitHub Page to use as root directory, after the build process. Simply it is your build output directory such as `./dist`. If your `vite` config exports to a folder other than `./dist`, then you should pass it as parameter.
159
310
160
311
161
312
### `install_phase_node_env`(optional)
@@ -194,14 +345,16 @@ Desired name for the exposed artifact. This name is visible in job and used as t
194
345
195
346
Indicate the package manager of preferrence. It'll be used for installing dependencies and building the `dist`. For example if you prefer/use `yarn` as your package manager for the project, then you may pass `package_manager: 'yarn'` as input which then will be used as `yarn install` and `yarn build`.
0 commit comments