This is an automated email from the ASF dual-hosted git repository.

zakwu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 391a94c  add github workflow for deploy (#2)
391a94c is described below

commit 391a94ca573e24da004f20890b43033ba6acb90f
Author: zakwu <[email protected]>
AuthorDate: Thu Jan 16 17:39:17 2020 +0800

    add github workflow for deploy (#2)
    
    * first commit
    
    * fix routePath 4 github pages
    
    * commit first version
    
    * commit first version
    
    * fix Advantages
    
    * zip png
    
    * 1、add github workflow for build and deploy, 2、remove some dirs
---
 .asf.yaml                    |  8 ++++++++
 .github/workflow/website.yml | 24 ++++++++++++++++++++++++
 404.html                     |  2 +-
 README.md                    |  1 -
 index.html                   |  2 +-
 site_config/site.js          |  2 +-
 6 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/.asf.yaml b/.asf.yaml
new file mode 100644
index 0000000..d67898b
--- /dev/null
+++ b/.asf.yaml
@@ -0,0 +1,8 @@
+# Web site staging services:
+staging:
+  profile: ~
+  whoami: master
+  foo: trigger
+
+publish:
+  whoami: asf-site
diff --git a/.github/workflow/website.yml b/.github/workflow/website.yml
new file mode 100644
index 0000000..14f117c
--- /dev/null
+++ b/.github/workflow/website.yml
@@ -0,0 +1,24 @@
+name: Build and Deploy
+
+on: [push]
+
+jobs:
+  build-and-deploy:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout
+        uses: actions/checkout@master
+
+      - name: Use Node.js
+        uses: actions/setup-node@v1
+        with:
+          node-version: 10.16.0
+      - name: Build
+        run: |
+          mkdir dist && npm install && npm i docsite && 
node_modules/docsite/bin/docsite.js build && cp -r 404.html .asf.yaml 
index.html en-us zh-cn build img dist/
+      - name: Deploy
+        uses: peaceiris/[email protected]
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          PUBLISH_BRANCH: asf-site
+          PUBLISH_DIR: ./dist
diff --git a/404.html b/404.html
index a6a9343..9599256 100644
--- a/404.html
+++ b/404.html
@@ -6,7 +6,7 @@
 <body>
   <script 
src="//cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>
        <script>
-    window.rootPath = '/incubator-tubemq-website';
+    window.rootPath = '';
     window.defaultLanguage = 'en-us';
     var lang = Cookies.get('docsite_language');
     if (!lang) {
diff --git a/README.md b/README.md
index 9bf3851..ab8c082 100644
--- a/README.md
+++ b/README.md
@@ -59,4 +59,3 @@ Then you are all set to run and build the website. Follow the 
build instruction
 2. Update site_config/docs.js, add a new entry in either en-us or zh-cn.
 3. Run docsite start locally to verify the article can be displayed correctly.
 4. Send the pull request contains the *.md and development.js only.
-
diff --git a/index.html b/index.html
index a6a9343..9599256 100644
--- a/index.html
+++ b/index.html
@@ -6,7 +6,7 @@
 <body>
   <script 
src="//cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>
        <script>
-    window.rootPath = '/incubator-tubemq-website';
+    window.rootPath = '';
     window.defaultLanguage = 'en-us';
     var lang = Cookies.get('docsite_language');
     if (!lang) {
diff --git a/site_config/site.js b/site_config/site.js
index f892592..b135781 100644
--- a/site_config/site.js
+++ b/site_config/site.js
@@ -1,6 +1,6 @@
 // 全局的一些配置
 export default {
-  rootPath: '/incubator-tubemq-website', // 
发布到服务器的根目录,需以/开头但不能有尾/,如果只有/,请填写空字符串
+  rootPath: '', // 发布到服务器的根目录,需以/开头但不能有尾/,如果只有/,请填写空字符串
   port: 8080, // 本地开发服务器的启动端口
   domain: 'tubemq.apache.org', // 站点部署域名,无需协议和path等
   defaultSearch: 'google', // 默认搜索引擎,baidu或者google

Reply via email to