Skip to content

Commit 4895f6f

Browse files
committed
v3.0.0
Complete rewrite! Switched from LFTP to git-ftp Upload diffs based on git history by default lower case kebab argument names Migrated from shell to typescript Added FTP and SFTP tests .git-ftp-ignore and .git-ftp-include support
1 parent e62d32e commit 4895f6f

19 files changed

+6602
-183
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
on: push
2+
name: Test FTP Deploy
3+
jobs:
4+
FTP-Deploy-Action:
5+
name: FTP-Deploy-Action
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@master
9+
with:
10+
fetch-depth: 2
11+
- name: FTP-Deploy-Action
12+
uses: SamKirkland/FTP-Deploy-Action-Typescript@master
13+
with:
14+
ftp-server: ftp://ftp.samkirkland.com/
15+
ftp-username: ${{ secrets.ftp_username }}
16+
ftp-password: ${{ secrets.ftp_password }}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
on: push
2+
name: Test SFTP Deploy
3+
jobs:
4+
FTP-Deploy-Action:
5+
name: FTP-Deploy-Action
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@master
9+
with:
10+
fetch-depth: 2
11+
- name: FTP-Deploy-Action
12+
uses: SamKirkland/FTP-Deploy-Action-Typescript@master
13+
with:
14+
# deploy to a folder named "sftp-deploy-test.samkirkland.com" on my server
15+
ftp-server: sftp://ftp.samkirkland.com:7822/home/samkirkland/sftp-deploy-test.samkirkland.com/
16+
ftp-username: ${{ secrets.sftp_username }}
17+
ftp-password: ${{ secrets.sftp_password }}
18+
git-ftp-args: --insecure

.gitignore

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
__tests__/runner/*
2+
3+
# comment out in distribution branches
4+
node_modules/
5+
6+
# Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
7+
# Logs
8+
logs
9+
*.log
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
lerna-debug.log*
14+
15+
# Diagnostic reports (https://nodejs.org/api/report.html)
16+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
17+
18+
# Runtime data
19+
pids
20+
*.pid
21+
*.seed
22+
*.pid.lock
23+
24+
# Directory for instrumented libs generated by jscoverage/JSCover
25+
lib-cov
26+
27+
# Coverage directory used by tools like istanbul
28+
coverage
29+
*.lcov
30+
31+
# nyc test coverage
32+
.nyc_output
33+
34+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
35+
.grunt
36+
37+
# Bower dependency directory (https://bower.io/)
38+
bower_components
39+
40+
# node-waf configuration
41+
.lock-wscript
42+
43+
# Compiled binary addons (https://nodejs.org/api/addons.html)
44+
build/Release
45+
46+
# Dependency directories
47+
jspm_packages/
48+
49+
# TypeScript v1 declaration files
50+
typings/
51+
52+
# TypeScript cache
53+
*.tsbuildinfo
54+
55+
# Optional npm cache directory
56+
.npm
57+
58+
# Optional eslint cache
59+
.eslintcache
60+
61+
# Optional REPL history
62+
.node_repl_history
63+
64+
# Output of 'npm pack'
65+
*.tgz
66+
67+
# Yarn Integrity file
68+
.yarn-integrity
69+
70+
# dotenv environment variables file
71+
.env
72+
.env.test
73+
74+
# parcel-bundler cache (https://parceljs.org/)
75+
.cache
76+
77+
# next.js build output
78+
.next
79+
80+
# nuxt.js build output
81+
.nuxt
82+
83+
# vuepress build output
84+
.vuepress/dist
85+
86+
# Serverless directories
87+
.serverless/
88+
89+
# FuseBox cache
90+
.fusebox/
91+
92+
# DynamoDB Local files
93+
.dynamodb/

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"files.exclude": {
3+
"**/node_modules": true
4+
}
5+
}

Dockerfile

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1-
FROM alpine:3.10
1+
FROM debian:stable-slim
22

3-
LABEL version="1.0.0"
43
LABEL repository="https://github.com/SamKirkland/FTP-Deploy-Action"
5-
LABEL homepage="https://github.com/SamKirkland/FTP-Deploy-Action"
64
LABEL maintainer="Sam Kirkland <[email protected]>"
75

8-
LABEL "com.github.actions.name"="FTP Deploy Action"
9-
LABEL "com.github.actions.description"="Deploy your website via FTP"
10-
LABEL "com.github.actions.icon"="upload-cloud"
11-
LABEL "com.github.actions.color"="orange"
6+
RUN apt-get update
7+
RUN apt-get install -y git
8+
RUN apt-get install -y git-ftp
9+
RUN apt-get install -y nodejs
1210

13-
RUN apk update
14-
RUN apk add openssh sshpass lftp
11+
COPY dist/index.js /deploy.js
12+
RUN chmod +x deploy.js
1513

16-
COPY entrypoint.sh /entrypoint.sh
17-
RUN chmod 777 entrypoint.sh
18-
ENTRYPOINT ["/entrypoint.sh"]
14+
ENTRYPOINT ["node", "../../deploy.js"]

LICENSE

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
MIT License
21

3-
Copyright (c) 2019 SamKirkland
2+
The MIT License (MIT)
3+
4+
Copyright (c) 2018 GitHub, Inc. and contributors
45

56
Permission is hereby granted, free of charge, to any person obtaining a copy
67
of this software and associated documentation files (the "Software"), to deal
@@ -9,13 +10,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
910
copies of the Software, and to permit persons to whom the Software is
1011
furnished to do so, subject to the following conditions:
1112

12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
13+
The above copyright notice and this permission notice shall be included in
14+
all copies or substantial portions of the Software.
1415

1516
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1617
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1718
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1819
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1920
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
THE SOFTWARE.

0 commit comments

Comments
 (0)