easywebhub / tasks

List of tasks for EasyWeb members
1 stars 4 forks source link

Thiết lập để publish websites lên github.com dùng EasyBuilder #62

Open baotnq opened 7 years ago

baotnq commented 7 years ago

Hiện trạng

Yêu cầu

Các bước thực hiện

1. Tạo new website trên EasyApp, build, sync, deploy -> branch gh-pages in gogs git server có site html code

Tut video

2. Setup webhook trên gogs server (https://source.easywebhub.com/)

Url https://demo.easywebhub.com/web-hook đây là callback url gogs server sẽ call khi repository có push event Secret == secret trong config của git-hook-listener image

Tut video

3. Tạo project trên github vd https://github.com/nemesisqp/demo-deploy-github

4. Thêm config trên git-hook-listener cho web site demo, thêm bằng cách edit file config của git-hook-listener hoặc post vo git-hook-listener

POST url https://demo.easywebhub.com/repositories tài liệu

{
    "repoUrl": "http://qq:d65f1c188efa497d2e9d28f1ea83b42625b574b1ec7e98b02db1404a9882faf2@source.easywebhub.com/qq/demo-deploy-github.git",
    "branch": "gh-pages",
    "cloneBranch": "gh-pages",
    "path": "repositories/demo-deploy-github",
    "args": [],
    "then": [
        {
            "command": "git",
            "args": [
                "remote", "add", "github", "https://nemesisqp:4edc1c28d3e659454b25c960f5672d3ca706f852@github.com/nemesisqp/demo-deploy-github.git"
            ],
            "options": {"cwd": "repositories/demo-deploy-github"}
        },
        {
            "command": "git",
            "args": [
                "push", "--force", "github", "gh-pages"
            ],
            "options": {"cwd": "repositories/demo-deploy-github"}
        }
    ]
}

5. Chỉnh sửa vài file nội dung rồi publish để thấy thay đổi trên github gh-pages url https://nemesisqp.github.io/demo-deploy-github/

CHÚ Ý cần xóa file CNAME trong website build folder nếu bị trùng, github sẽ có báo mail nếu trùng Document chi tiết cũ ở đây

nemesisqp commented 7 years ago
  1. Tạo new website trên EasyApp, build, sync, deploy -> branch gh-pages in gogs git server có site html code Tut video
nemesisqp commented 7 years ago
  1. Setup webhook trên gogs server (https://source.easywebhub.com/) Url https://demo.easywebhub.com/web-hook đây là callback url gogs server sẽ call khi repository có push event Secret == secret trong config của git-hook-listener image

Tut video

nemesisqp commented 7 years ago
  1. Tạo project trên github vd https://github.com/nemesisqp/demo-deploy-github
nemesisqp commented 7 years ago
  1. Thêm config trên git-hook-listener cho web site demo, thêm bằng cách edit file config của git-hook-listener hoặc post vo git-hook-listener POST url https://demo.easywebhub.com/repositories tài liệu
    {
    "repoUrl": "http://qq:d65f1c188efa497d2e9d28f1ea83b42625b574b1ec7e98b02db1404a9882faf2@source.easywebhub.com/qq/demo-deploy-github.git",
    "branch": "gh-pages",
    "cloneBranch": "gh-pages",
    "path": "repositories/demo-deploy-github",
    "args": [],
    "then": [
        {
            "command": "git",
            "args": [
                "remote", "add", "github", "https://nemesisqp:4edc1c28d3e659454b25c960f5672d3ca706f852@github.com/nemesisqp/demo-deploy-github.git"
            ],
            "options": {"cwd": "repositories/demo-deploy-github"}
        },
        {
            "command": "git",
            "args": [
                "push", "--force", "github", "gh-pages"
            ],
            "options": {"cwd": "repositories/demo-deploy-github"}
        }
    ]
    }
nemesisqp commented 7 years ago
  1. Chỉnh sửa vài file nội dung rồi publish để thấy thay đổi trên github gh-pages url https://nemesisqp.github.io/demo-deploy-github/

CHÚ Ý cần xóa file CNAME trong website build folder nếu bị trùng, github sẽ có báo mail nếu trùng Document chi tiết cũ ở đây

baotnq commented 7 years ago

many thanks @nemesisqp !

@tungptvn em review lại hướng dẫn của anh @nemesisqp xem hiểu và tự làm được không nghe. Sau đó tổng hợp lại dựa trên các steps của phương bên trên

Ngoài ra CNAME bị trùng, em xóa hết CNAME file trong mastergh-pages của các repositories liệt kê trong file này https://easywebhub.com/website-marketplace.json nghe, đây là file dùng hiển thị danh sách trong Market của EasyBuilder đó

baotnq commented 7 years ago

@thanhtdvn phần này một số bước API có thể tự động hóa việc thứ hiện, em tích hợp vào quá trình Confirm website nghe. @tungptvn cũng nắm đầy đủ các steps này, cần trao đổi để phối hợp cho tốt.

Em xem các steps mà phương đã mô tả bên trên.