Skip to content

Commit 2d118d9

Browse files
authored
Adding example for exclude
1 parent 2a4e9b1 commit 2d118d9

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ I strongly recommend you store your `password` as a secret.
6767
| `state-name` | No | `folder/.sync-state.json` | `.ftp-deploy-sync-state.json` | Path and name of the state file - this file is used to track which files have been deployed |
6868
| `dry-run` | No | `true` | `false` | Prints which modifications will be made with current config options, but doesn't actually make any changes |
6969
| `dangerous-clean-slate` | No | `true` | `false` | Deletes ALL contents of server-dir, even items in excluded with 'exclude' argument |
70-
| `exclude` | No | | `[.git*, .git*/**, node_modules/**, node_modules/**/*]` | An array of glob patterns, these files will not be included in the publish/delete process |
70+
| `exclude` | No | | `.git*` `.git*/**` `node_modules/**` `node_modules/**/*` | An array of glob patterns, these files will not be included in the publish/delete process. [List must be in yaml array format](#exclude-files) |
7171
| `log-level` | No | `minimal` | `standard` | `minimal`: only important info, `standard`: important info and basic file changes, `verbose`: print everything the script is doing |
7272
| `security` | No | `strict` | `loose` | `strict`: Reject any connection which is not authorized with the list of supplied CAs. `loose`: Allow connection even when the domain is not certificate |
7373

@@ -149,6 +149,32 @@ jobs:
149149
dry-run: true
150150
```
151151

152+
#### Exclude files
153+
Excludes files
154+
```yml
155+
on: push
156+
name: 🚀 Deploy website on push
157+
jobs:
158+
web-deploy:
159+
name: 🎉 Deploy
160+
runs-on: ubuntu-latest
161+
steps:
162+
- name: 🚚 Get latest code
163+
uses: actions/[email protected]
164+
165+
- name: 📂 Sync files
166+
uses: SamKirkland/[email protected]
167+
with:
168+
server: ftp.samkirkland.com
169+
username: myFtpUserName
170+
password: ${{ secrets.password }}
171+
exclude: .git*
172+
- .git*/**
173+
- **/.git*/**
174+
- node_modules/**
175+
- node_modules/**/*
176+
```
177+
152178
_Want another example? Let me know by creating a [github issue](https://github.com/SamKirkland/FTP-Deploy-Action/issues/new)_
153179

154180
---

0 commit comments

Comments
 (0)