Skip to content

Commit c14c34b

Browse files
committed
updated ftp-deploy version
1 parent b6b6e42 commit c14c34b

File tree

11 files changed

+169
-6738
lines changed

11 files changed

+169
-6738
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
dist/
2-
lib/
32
node_modules/

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ jobs:
2323
**My Action Log**
2424
```
2525
# Paste Log here
26+
# you may want enable verbose logging with log-level: verbose
2627
```

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,4 @@ typings/
9292

9393
# OS metadata
9494
.DS_Store
95-
Thumbs.db
96-
97-
# Ignore built ts files
98-
lib/**/*
95+
Thumbs.db

README.md

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ Automate deploying websites and more with this GitHub action
99
![FTP test](https://github.com/SamKirkland/FTP-Deploy-Action/workflows/FTP%20Test/badge.svg)
1010
![FTPS test](https://github.com/SamKirkland/FTP-Deploy-Action/workflows/FTPS%20Test/badge.svg)
1111

12-
![npm](https://img.shields.io/npm/v/@samkirkland/ftp-deploy?style=flat-square)
13-
![npm](https://img.shields.io/npm/dt/@samkirkland/ftp-deploy)
14-
1512
---
1613

1714
### Usage Example
@@ -71,9 +68,8 @@ I strongly recommend you store your `password` as a secret.
7168
| `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 |
7269
| `dry-run` | No | `true` | `false` | Prints which modifications will be made with current config options, but doesn't actually make any changes |
7370
| `dangerous-clean-slate` | No | `true` | `false` | Deletes ALL contents of server-dir, even items in excluded with 'exclude' argument |
74-
| `include` | No | | `` | :warning: not implemented yet - An array of glob patterns, these files will always be included in the publish/delete process - even if no change occurred |
7571
| `exclude` | No | | `.git*` `.git*/**` `node_modules/**` `node_modules/**/*` | An array of glob patterns, these files will not be included in the publish/delete process |
76-
| `log-level` | No | `info` | `info` | `warn`: only important/warning info, `info`: default, log important/warning info & progress info, `debug`: log everything for debugging |
72+
| `log-level` | No | `minimal` | `standard` | `minimal`: only important info, `standard`: important info and basic file changes, `verbose`: print everything the script is doing |
7773
| `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 |
7874

7975

@@ -190,17 +186,14 @@ jobs:
190186
```
191187
</details>
192188

189+
## Debugging your config locally
190+
This action is a basic wrapper around my `@samkirkland/ftp-deploy` npm package. To test your config you can install [@samkirkland/ftp-deploy](https://github.com/SamKirkland/ftp-deploy) and then convert your config to a yml action. Settings are one-to-one, this action is only a wrapper.
191+
193192

194-
## Debugging locally
193+
## Contributing to this project
194+
To run this code locally you will need to setup docker and act to run a environment similar to the one github uses for actions.
195+
- Download/install docker for windows, make sure it is running
196+
- `choco install act-cli` install [act](https://github.com/nektos/act)
195197
- Install the npm package using `npm install --dev-only @samkirkland/ftp-deploy`
196-
- Add a new key to your `package.json` file under `scripts`
198+
- Update the `deploy` script in `package.json` with a actual server/username/password
197199
- You can run the script using the following command `npm run deploy` (run this in the folder that has the `package.json` file)
198-
199-
Example of `package.json`:
200-
```json
201-
{
202-
"scripts": {
203-
"deploy": "ftp-deploy --server ftp.samkirkland.com --username [email protected] --password \"CrazyUniquePassword&%123\"",
204-
},
205-
}
206-
```

action.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ inputs:
1111
password:
1212
required: true
1313
description: 'ftp password'
14-
protocol:
15-
required: false
16-
description: 'protocol to deploy with - ftp, ftps, or ftps-legacy'
1714
port:
1815
required: false
1916
description: 'Server port to connect to (read your web hosts docs)'
17+
protocol:
18+
required: false
19+
description: 'protocol to deploy with - ftp, ftps, or ftps-legacy'
2020
local-dir:
2121
required: false
2222
description: 'Folder to upload from, must end with trailing slash /'
@@ -32,9 +32,6 @@ inputs:
3232
dangerous-clean-slate:
3333
required: false
3434
description: 'Deletes ALL contents of server-dir, even items in excluded with exclude argument'
35-
include:
36-
required: false
37-
description: 'An array of glob patterns, these files will always be included in the publish/delete process - even if no change occurred'
3835
exclude:
3936
required: false
4037
description: 'An array of glob patterns, these files will not be included in the publish/delete process'
@@ -46,7 +43,7 @@ inputs:
4643
description: 'strict or loose'
4744
runs:
4845
using: 'node12'
49-
main: 'dist/index.js'
46+
main: 'dist/main.js'
5047
branding:
5148
icon: 'upload-cloud'
5249
color: 'orange'

0 commit comments

Comments
 (0)