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
+40-19Lines changed: 40 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -52,17 +52,15 @@ jobs:
52
52
runs-on: ubuntu-latest
53
53
steps:
54
54
- name: Checkout 🛎️
55
-
uses: actions/checkout@v2.3.1 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
56
-
with:
57
-
persist-credentials: false
55
+
uses: actions/checkout@v2.3.1
58
56
59
57
- name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
60
58
run: |
61
59
npm install
62
60
npm run build
63
61
64
62
- name: Deploy 🚀
65
-
uses: JamesIves/github-pages-deploy-action@3.7.1
63
+
uses: JamesIves/github-pages-deploy-action@4.0.0
66
64
with:
67
65
branch: gh-pages # The branch the action should deploy to.
68
66
folder: build # The folder the action should deploy.
@@ -180,7 +178,7 @@ With this configured you can then set the `ssh-key` part of the action to your p
180
178
181
179
```yml
182
180
- name: Deploy 🚀
183
-
uses: JamesIves/github-pages-deploy-action@3.7.1
181
+
uses: JamesIves/github-pages-deploy-action@4.0.0
184
182
with:
185
183
branch: gh-pages
186
184
folder: site
@@ -202,16 +200,14 @@ jobs:
202
200
steps:
203
201
- name: Checkout 🛎️
204
202
uses: actions/checkout@v2
205
-
with:
206
-
persist-credentials: false
207
203
208
204
- name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
209
205
run: |
210
206
npm install
211
207
npm run build
212
208
213
209
- name: Deploy 🚀
214
-
uses: JamesIves/github-pages-deploy-action@3.7.1
210
+
uses: JamesIves/github-pages-deploy-action@4.0.0
215
211
with:
216
212
branch: gh-pages
217
213
folder: build
@@ -253,8 +249,6 @@ jobs:
253
249
steps:
254
250
- name: Checkout 🛎️
255
251
uses: actions/checkout@v2
256
-
with:
257
-
persist-credentials: false
258
252
259
253
- name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
260
254
run: |
@@ -273,16 +267,14 @@ jobs:
273
267
steps:
274
268
- name: Checkout 🛎️
275
269
uses: actions/checkout@v2
276
-
with:
277
-
persist-credentials: false
278
270
279
271
- name: Download Artifacts 🔻 # The built project is downloaded into the 'site' folder.
280
272
uses: actions/download-artifact@v1
281
273
with:
282
274
name: site
283
275
284
276
- name: Deploy 🚀
285
-
uses: JamesIves/github-pages-deploy-action@3.7.1
277
+
uses: JamesIves/github-pages-deploy-action@4.0.0
286
278
with:
287
279
token: ${{ secrets.ACCESS_TOKEN }}
288
280
branch: gh-pages
@@ -304,22 +296,51 @@ If you use a [container](https://help.github.com/en/actions/automating-your-work
304
296
apt-get update && apt-get install -y rsync
305
297
306
298
- name: Deploy 🚀
307
-
uses: JamesIves/github-pages-deploy-action@3.7.1
299
+
uses: JamesIves/github-pages-deploy-action@4.0.0
308
300
```
309
301
310
302
---
311
303
312
304
### Additional Build Files 📁
313
305
314
-
If you're using a custom domain and require a `CNAME` file, or if you require the use of a `.nojekyll` file, you can safely commit these files directly into deployment branch without them being overridden after each deployment. Additionally you can include these files in your deployment folder to update them.
306
+
If you're using a custom domain and require a `CNAME` file, or if you require the use of a `.nojekyll` file, you can safely commit these files directly into deployment branch without them being overridden after each deployment, additionally you can include these files in your deployment folder to update them. If you need to add additional files to the deployment that should be ignored by the build clean-up steps you can utilize the `clean-exclude` option.
315
307
316
-
If you wish to remove these files you must go into the deployment branch directly to remove them. This is to prevent accidental changes in your deployment script from creating breaking changes.
317
308
318
-
---
309
+
<details><summary>Click here to view an exmaple of this.</summary>
310
+
<p>
319
311
320
-
### Debugging 🐝
312
+
```yml
313
+
name: Build and Deploy
314
+
on:
315
+
push:
316
+
branches:
317
+
- master
318
+
jobs:
319
+
deploy:
320
+
runs-on: ubuntu-latest
321
+
steps:
322
+
- name: Checkout 🛎️
323
+
uses: actions/checkout@v2
321
324
322
-
If you'd like to enable action debugging you can set the `ACTIONS_STEP_DEBUG` environment variable to true within the [Settings/Secrets](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#creating-encrypted-secrets) menu. If you're using this action in your own project as a node module via yarn or npm **you may expose your secrets if you toggle this on in a production environment**. You can learn more about debugging GitHub actions [here](https://github.com/actions/toolkit/blob/master/docs/action-debugging.md).
325
+
- name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
326
+
run: |
327
+
npm install
328
+
npm run build
329
+
330
+
- name: Deploy 🚀
331
+
uses: JamesIves/github-pages-deploy-action@4.0.0
332
+
with:
333
+
branch: gh-pages
334
+
folder: build
335
+
clean: true
336
+
clean-exclude: |
337
+
special-file.txt
338
+
some/*.txt
339
+
```
340
+
</p>
341
+
</details>
342
+
343
+
If you wish to remove these files you must go into the deployment branch directly to remove them. This is to prevent accidental changes in your deployment script from creating breaking changes.
0 commit comments