Skip to content

Commit 999e002

Browse files
committed
update readme
1 parent d647c7b commit 999e002

File tree

2 files changed

+27
-14
lines changed

2 files changed

+27
-14
lines changed

README.Zh-CN.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,20 @@ Crane 是一个使用 Rust 编写的简单、快速且安全的工具,用于
1818

1919
## 安装说明
2020

21+
Crane 会将 `.tar.gz` 文件解压到 `/dist/` 目录下。所以在使用docker时,挂在你需要部署的host目录到容器的 `/dist/` 目录下即可。
2122

2223
1. 使用 Docker
2324

2425
```bash
25-
docker run -e API_KEY={YOUR_SUPER_SECURE_API_KEY} -p 8594:8594 -v /dist_path_on_host/:/dist/ wangyucode/crane:0.1.0
26+
docker run -e API_KEY={YOUR_SUPER_SECURE_API_KEY} -p 8594:8594 -v /dist_path_on_host/:/dist/ wangyucode/crane:0.1.2
2627
```
2728

2829
2. 使用 docker-compose
2930

3031
```yaml
3132
services:
3233
crane:
33-
image: wangyucode/crane:0.1.0
34+
image: wangyucode/crane:0.1.2
3435
environment:
3536
- API_KEY={YOUR_SUPER_SECURE_API_KEY}
3637
ports:
@@ -39,7 +40,7 @@ services:
3940
- /dist_path_on_host/:/dist/
4041
```
4142
42-
3. 使用二进制文件
43+
3. 从源码构建
4344
```
4445
git clone https://github.com/wangyucode/crane
4546
cargo build --release
@@ -50,7 +51,7 @@ cargo build --release
5051
## 使用方法
5152

5253
```bash
53-
curl -H "X-Api-Key: {YOUR_SUPER_SECURE_API_KEY}" http://{your_server_address}:8594/?url=https://example.com/file.tar.gz
54+
curl -H "X-Api-Key: {YOUR_SUPER_SECURE_API_KEY}" http://{your_server_address}:8594/deploy?url=https://example.com/file.tar.gz
5455
```
5556

5657
因此,您可以在 CI/CD 管道中使用它。
@@ -64,13 +65,17 @@ jobs:
6465
...
6566
- name: use Crane to deploy
6667
run: |
67-
curl -H "X-Api-Key: ${{secrets.CRANE_API_KEY}}" http://${secrets.SERVER_ADDRESS}:8594/?url=https://github.com/your-repo/your-repo/releases/download/v1.0.0/dist.tar.gz
68+
curl -H "X-Api-Key: ${{secrets.CRANE_API_KEY}}" http://${secrets.SERVER_ADDRESS}:8594/deploy?url=https://github.com/your-repo/your-repo/releases/download/v1.0.0/dist.tar.gz
6869
...
6970
```
7071

71-
> **Waring**: 警告: API_KEY 是必需的,如果未设置,Crane 将无法启动。请将使用强密码
72+
> **Waring**: 警告: `API_KEY` 是必需的,如果未设置,Crane 将无法启动。请使用强密码
7273
7374
## 路线图
7475

7576
- [ ] 当新的部署被触发时,取消上一个部署
76-
- [ ] 支持选项,覆盖标志
77+
- [ ] 支持选项,覆盖标志
78+
79+
## 其它选项
80+
81+
如果你正在寻找一个github actions, 来使用服务器密钥通过 `sftp` 部署文件,你可以尝试 [wangyucode/sftp-upload-action](https://github.com/wangyucode/sftp-upload-action)

README.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
# Crane - Fast and Secure .tar.gz Deployment
1+
<div align="center">
2+
<img src="logo.jpg" width=256></img>
3+
<p><strong>Crane - Fast and Secure .tar.gz Deployment</strong></p>
24

3-
![Crane](logo.jpg)
5+
English | [简体中文](README_Zh-CN.md)
46

5-
English | [简体中文](README_Zh-CN.md)
7+
</div>
68

79
Crane is a simple, fast, and secure tool write in Rust for downloading and deploying your `.tar.gz` archive files without the need for server passwords or keys. It was designed to provide a quick and convenient way to deploy your software or files to a server without the usual complexities of authentication and authorization.
810

@@ -15,18 +17,20 @@ Crane is a simple, fast, and secure tool write in Rust for downloading and deplo
1517

1618
## Installation
1719

20+
Crane will decompress the `.tar.gz` file to the `/dist/` directory. So when using Docker, just mount the host directory you want to deploy to the `/dist/` directory of the container.
21+
1822
1. use Docker
1923

2024
```bash
21-
docker run -e API_KEY={YOUR_SUPER_SECURE_API_KEY} -p 8594:8594 -v /dist_path_on_host/:/dist/ wangyucode/crane:0.1.0
25+
docker run -e API_KEY={YOUR_SUPER_SECURE_API_KEY} -p 8594:8594 -v /dist_path_on_host/:/dist/ wangyucode/crane:0.1.2
2226
```
2327

2428
2. use docker-compose
2529

2630
```yaml
2731
services:
2832
crane:
29-
image: wangyucode/crane:0.1.0
33+
image: wangyucode/crane:0.1.2
3034
environment:
3135
- API_KEY={YOUR_SUPER_SECURE_API_KEY}
3236
ports:
@@ -46,7 +50,7 @@ cargo build --release
4650
## Usage
4751

4852
```bash
49-
curl -H "X-Api-Key: {YOUR_SUPER_SECURE_API_KEY}" http://{your_server_address}:8594/?url=https://example.com/file.tar.gz
53+
curl -H "X-Api-Key: {YOUR_SUPER_SECURE_API_KEY}" http://{your_server_address}:8594/deploy?url=https://example.com/file.tar.gz
5054
```
5155

5256
so you can use it in your CI/CD pipeline.
@@ -60,7 +64,7 @@ jobs:
6064
...
6165
- name: use Crane to deploy
6266
run: |
63-
curl -H "X-Api-Key: ${{secrets.CRANE_API_KEY}}" http://${secrets.SERVER_ADDRESS}:8594/?url=https://github.com/your-repo/your-repo/releases/download/v1.0.0/dist.tar.gz
67+
curl -H "X-Api-Key: ${{secrets.CRANE_API_KEY}}" http://${secrets.SERVER_ADDRESS}:8594/deploy?url=https://github.com/your-repo/your-repo/releases/download/v1.0.0/dist.tar.gz
6468
...
6569
```
6670

@@ -70,3 +74,7 @@ jobs:
7074

7175
- [ ] Cancel last deployment when new deployment is triggered.
7276
- [ ] Support options, override flag.
77+
78+
## Other Options
79+
80+
If you're looking for a GitHub action to deploy files via `sftp` using server keys, you can try [wangyucode/sftp-upload-action](https://github.com/wangyucode/sftp-upload-action)

0 commit comments

Comments
 (0)