Một mục mã nguồn mở trong kho dữ liệu GitHub của TopGit: SamKirkland/FTP-Deploy-Action, 5.3k sao, TypeScript. Deploys a GitHub project to a FTP server using GitHub actions
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
You must have ftp access to your server. If your host allows or requires ssh please use my web-deploy action
Some web hosts change the default port (21), check with your host for your port number
Setup Steps
Select the repository you want to add the action to
Select the Actions tab
Select Blank workflow file or Set up a workflow yourself, if you don't see these options manually create a yaml file Your_Project/.github/workflows/main.yml
Paste the example above into your yaml file and save
Now you need to add a key to the secrets section in your project. To add a secret go to the Settings tab in your project then select Secrets. Add a new Secret for password
Update your yaml file settings
If you appreciate this github action give it a :star: or show off with one of the badges below.
Settings
Keys can be added directly to your .yml config file or referenced from your project Secrets storage.
To add a secret go to the Settings tab in your project then select Secrets.
I strongly recommend you store your password as a secret.
Server port to connect to (read your web hosts docs)
protocol
No
ftps
ftp
ftp: provides no encryption, ftps: full encryption newest standard (aka "explicit" ftps), ftps-legacy: full encryption legacy standard (aka "implicit" ftps)
local-dir
No
./myFolderToPublish/
./
Folder to upload from, must end with trailing slash /
server-dir
No
public_html/www/
./
Folder to upload to (on the server), must end with trailing slash /
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
dry-run
No
true
false
Prints which modifications will be made with current config options, but doesn't actually make any changes
dangerous-clean-slate
No
true
false
Deletes ALL contents of server-dir, even items in excluded with 'exclude' argument
exclude
No
See Example
See Example
An array of glob patterns, these files will not be included in the publish/delete process. List MUST be in this format. You can use a glob tester to test your pattern(s).
log-level
No
minimal
standard
minimal: only important info, standard: important info and basic file changes, verbose: print everything the script is doing
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
timeout
No
60000
30000
Timeout in milliseconds for FTP operations
Common Examples
Build and Publish React/Angular/Vue Website
Make sure you have an npm script named 'build'. This config should work for most node built websites.
if you overwrite the default value you will probably want to respecify them
Want another example? Let me know by creating a github issue
Badge
If you appreciate this github action give it a :star: or show off with one of the badges below. Feel free to edit the text or color.
[<img alt="Deployed with FTP Deploy Action" src="https://img.shields.io/badge/Deployed With-FTP DEPLOY ACTION-%3CCOLOR%3E?style=for-the-badge&color=0077b6">](https://github.com/SamKirkland/FTP-Deploy-Action)
[<img alt="Deployed with FTP Deploy Action" src="https://img.shields.io/badge/Deployed With-FTP DEPLOY ACTION-%3CCOLOR%3E?style=for-the-badge&color=2b9348">](https://github.com/SamKirkland/FTP-Deploy-Action)
[<img alt="Deployed with FTP Deploy Action" src="https://img.shields.io/badge/Deployed With-FTP DEPLOY ACTION-%3CCOLOR%3E?style=for-the-badge&color=d00000">](https://github.com/SamKirkland/FTP-Deploy-Action)
[<img alt="Website Deployed for Free with FTP Deploy Action" src="https://img.shields.io/badge/Website deployed for free with-FTP DEPLOY ACTION-%3CCOLOR%3E?style=for-the-badge&color=297FA9">](https://github.com/SamKirkland/FTP-Deploy-Action)
[<img alt="Website Deployed for Free with FTP Deploy Action" src="https://img.shields.io/badge/Website deployed for free with-FTP DEPLOY ACTION-%3CCOLOR%3E?style=for-the-badge&color=2b9348">](https://github.com/SamKirkland/FTP-Deploy-Action)
[<img alt="Website Deployed for Free with FTP Deploy Action" src="https://img.shields.io/badge/Website deployed for free with-FTP DEPLOY ACTION-%3CCOLOR%3E?style=for-the-badge&color=d00000">](https://github.com/SamKirkland/FTP-Deploy-Action)
FAQ
How to exclude .git files from the publish
Git files are excluded by default! If you customize the exclude option make sure you re-add the default options.
How to exclude a specific file or folder
You can use the exclude option to ignore specific files/folders from the publish. Keep in mind you will need to re-add the default exclude options if you want to keep them. For example the below option excludes all .txt files.
exclude:
- *.txt
How do I set a upload timeout?
github has a built-in timeout-minutes option, see customized example below
on: push
name: Publish Website
jobs:
web-deploy:
name: web-deploy
runs-on: ubuntu-latest
timeout-minutes: 15 # time out after 15 minutes (default is 360 minutes)
steps:
....
Debugging your config locally
This action is a basic wrapper around my @samkirkland/ftp-deploy npm package. To test your config you can install @samkirkland/ftp-deploy and then convert your config to a yml action. Settings are one-to-one, this action is only a wrapper.
Contributing to this project
To test this action locally you will need to setup docker and act to run a environment similar to the one github uses for actions.
Download/install docker for windows, make sure it is running
choco install act-cli install act
Install the npm package using npm install --dev-only @samkirkland/ftp-deploy
Update the deploy script in package.json with a actual server/username/password
You can run the script using the following command npm run deploy (run this in the folder that has the package.json file)
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/SamKirkland/FTP-Deploy-Action là nguồn chính thức.
SamKirkland/FTP-Deploy-Action có những chủ đề gì?
GitHub topics của SamKirkland/FTP-Deploy-Action: "action", "actions", "continuous-deployment", "continuous-integration", "deploy-action", "deployment-automation", "github-actions". TopGit xếp repo vào nhóm mã nguồn mở.
SamKirkland/FTP-Deploy-Action có phải mã nguồn mở không?
Có — SamKirkland/FTP-Deploy-Action phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/SamKirkland/FTP-Deploy-Action.
SamKirkland/FTP-Deploy-Action có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho SamKirkland/FTP-Deploy-Action. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
SamKirkland/FTP-Deploy-Action còn đang phát triển không?
Commit gần nhất trên SamKirkland/FTP-Deploy-Action là 7 tháng trước (theo timestamp GitHub). Repo có 445 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
SamKirkland/FTP-Deploy-Action dùng license gì?
SamKirkland/FTP-Deploy-Action phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
Đọc đầy đủ README ở tab phía trên.
FTP-Deploy-Action có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về FTP-Deploy-Action.