8000 Update README.md · lyrl/github-pages-deploy-action@00910a9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 00910a9

Browse files
authored
Update README.md
1 parent 86419a8 commit 00910a9

File tree

1 file changed

+40
-19
lines changed

1 file changed

+40
-19
lines changed

README.md

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,15 @@ jobs:
5252
runs-on: ubuntu-latest
5353
steps:
5454
- 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
5856

5957
- 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.
6058
run: |
6159
npm install
6260
npm run build
6361
6462
- name: Deploy 🚀
65-
uses: JamesIves/github-pages-deploy-action@3.7.1
63+
uses: JamesIves/github-pages-deploy-action@4.0.0
6664
with:
6765
branch: gh-pages # The branch the action should deploy to.
6866
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
180178

181179
```yml
182180
- name: Deploy 🚀
183-
uses: JamesIves/github-pages-deploy-action@3.7.1
181+
uses: JamesIves/github-pages-deploy-action@4.0.0
184182
with:
185183
branch: gh-pages
186184
folder: site
@@ -202,16 +200,14 @@ jobs:
202200
steps:
203201
- name: Checkout 🛎️
204202
uses: actions/checkout@v2
205-
with:
206-
persist-credentials: false
207203

208204
- 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.
209205
run: |
210206
npm install
211207
npm run build
212208
213209
- name: Deploy 🚀
214-
uses: JamesIves/github-pages-deploy-action@3.7.1
210+
uses: JamesIves/github-pages-deploy-action@4.0.0
215211
with:
216212
branch: gh-pages
217213
folder: build
@@ -253,8 +249,6 @@ jobs:
253249
steps:
254250
- name: Checkout 🛎️
255251
uses: actions/checkout@v2
256-
with:
257-
persist-credentials: false
258252
259253
- 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.
260254
run: |
@@ -273,16 +267,14 @@ jobs:
273267
steps:
274268
- name: Checkout 🛎️
275269
uses: actions/checkout@v2
276-
with:
277-
persist-credentials: false
278270
279271
- name: Download Artifacts 🔻 # The built project is downloaded into the 'site' folder.
280272
uses: actions/download-artifact@v1
281273
with:
282274
name: site
283275
284276
- name: Deploy 🚀
285-
uses: JamesIves/github-pages-deploy-action@3.7.1
277+
uses: JamesIves/github-pages-deploy-action@4.0.0
286278
with:
287279
token: ${{ secrets.ACCESS_TOKEN }}
288280
branch: gh-pages
@@ -304,22 +296,51 @@ If you use a [container](https://help.github.com/en/actions/automating-your-work
304296
apt-get update && apt-get install -y rsync
305297
306298
- name: Deploy 🚀
307-
uses: JamesIves/github-pages-deploy-action@3.7.1
299+
uses: JamesIves/github-pages-deploy-action@4.0.0
308300
```
309301

310302
---
311303

312304
### Additional Build Files 📁
313305

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

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

318-
---
309+
<details><summary>Click here to view an exmaple of this.</summary>
310+
<p>
319311

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
321324
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.
323344

324345
---
325346

0 commit comments

Comments
 (0)
0