Skip to content

Commit 324bdc8

Browse files
committed
extend readme
1 parent 737edd1 commit 324bdc8

File tree

3 files changed

+28
-3
lines changed

3 files changed

+28
-3
lines changed

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ It does auto deploy your site to hosting
99
2. Access to perform **shell** commands
1010
3. Installed **GIT** on target hosting
1111

12-
# Start to use
12+
# Start to use through composer
13+
14+
The main using through composer.
1315

1416
1. Install package:
1517
```php
@@ -32,6 +34,29 @@ It does auto deploy your site to hosting
3234

3335
Do not forget to change the secret code ``ytJHvMHFdTYUryDhmJkjFjFiYk``
3436

37+
# Start to use through npm
38+
39+
If you making SPA and the files is located on a php hosting, then you can does auto deployment through the package.
40+
41+
1. Install package:
42+
```bash
43+
$ npm i git-auto-deploy-ex
44+
```
45+
46+
2. Make file ``deploy.php`` with content:
47+
```php
48+
<?php
49+
require_once '\path\to\DeployApplication';
50+
// Add secret code in the first parameter for protection
51+
(new \optimistex\deploy\DeployApplication('ytJHvMHFdTYUryDhmJkjFjFiYk'))->run();
52+
```
53+
54+
3. Configure WebHook for send request to:
55+
56+
http://your.domain/deploy.php?key=ytJHvMHFdTYUryDhmJkjFjFiYk
57+
58+
4. Visit page ``http://your.domain/deploy.php`` to check log history
59+
3560
### Extended deploy with custom commands
3661

3762
For extended deployment make the file ``deploy.php`` with code:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "optimistex/git-auto-deploy-ex",
3-
"version": "1.2.5",
3+
"version": "1.2.6",
44
"type": "library",
55
"description": "The little project for auto-deploying projects to a hosting",
66
"keywords": [

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "git-auto-deploy-ex",
3-
"version": "1.2.5",
3+
"version": "1.2.6",
44
"description": "The little project for auto-deploying projects to a hosting",
55
"main": "index.js",
66
"directories": {

0 commit comments

Comments
 (0)