You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2021/12/13 06:18:01 UTC

[incubator-doris-website] branch master updated: add workflow

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

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


The following commit(s) were added to refs/heads/master by this push:
     new dca32cf  add workflow
dca32cf is described below

commit dca32cf9e503b85fb8c08eece075e3c5c76b26b6
Author: morningman <ch...@baidu.com>
AuthorDate: Mon Dec 13 14:17:20 2021 +0800

    add workflow
---
 .../{website.yml => cron-deploy-website.yml}          | 19 +++++++------------
 .../{website.yml => manual-deploy-website.yml}        |  2 +-
 README.md                                             | 14 +++++++++++++-
 3 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/.github/workflows/website.yml b/.github/workflows/cron-deploy-website.yml
similarity index 69%
copy from .github/workflows/website.yml
copy to .github/workflows/cron-deploy-website.yml
index d508f92..21d7349 100644
--- a/.github/workflows/website.yml
+++ b/.github/workflows/cron-deploy-website.yml
@@ -1,12 +1,8 @@
-name: Manual Deploy
+name: Cron Deploy
 
 on: 
-  workflow_dispatch:
-    inputs:
-      branch:
-        description: 'Specify the branch name'
-        required: true
-        default: 'master'
+  schedule:
+    - cron: '0 1 * * *'
 
 jobs:
   build-and-deploy:
@@ -23,12 +19,11 @@ jobs:
     - name: Build
       run: |
         git clone https://github.com/apache/incubator-doris.git incubator-doris
-        git checkout ${{ github.event.inputs.branch }}
-        export DORIS_COMMIT=`git rev-parse HEAD`
-        export BRANCH=${{ github.event.inputs.branch }}
+        export BRANCH=master
         cd incubator-doris/docs && npm install && npm run build
         touch .vuepress/dist/.dummy
         ls .vuepress/dist/
+        export DORIS_COMMIT=`git rev-parse HEAD`
 
     - name: Deploy
       uses: peaceiris/actions-gh-pages@v3
@@ -36,8 +31,8 @@ jobs:
         github_token: ${{ secrets.GITHUB_TOKEN }}
         publish_branch: asf-site
         publish_dir: ./incubator-doris/docs/.vuepress/dist
-        destination_dir: ${{ github.event.inputs.branch }}
+        destination_dir: master
         user_name: 'github-actions[bot]'
         user_email: 'github-actions[bot]@users.noreply.github.com'
-        commit_message: 'Automated deployment with doris branch ${{ github.event.inputs.branch }}@${{ env.DORIS_COMMIT }}'
+        commit_message: 'Automated deployment with doris branch master@${{ env.DORIS_COMMIT }}'
 
diff --git a/.github/workflows/website.yml b/.github/workflows/manual-deploy-website.yml
similarity index 100%
rename from .github/workflows/website.yml
rename to .github/workflows/manual-deploy-website.yml
index d508f92..fcd46c8 100644
--- a/.github/workflows/website.yml
+++ b/.github/workflows/manual-deploy-website.yml
@@ -24,11 +24,11 @@ jobs:
       run: |
         git clone https://github.com/apache/incubator-doris.git incubator-doris
         git checkout ${{ github.event.inputs.branch }}
-        export DORIS_COMMIT=`git rev-parse HEAD`
         export BRANCH=${{ github.event.inputs.branch }}
         cd incubator-doris/docs && npm install && npm run build
         touch .vuepress/dist/.dummy
         ls .vuepress/dist/
+        export DORIS_COMMIT=`git rev-parse HEAD`
 
     - name: Deploy
       uses: peaceiris/actions-gh-pages@v3
diff --git a/README.md b/README.md
index 24bef74..fda8d45 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,19 @@ under the License.
 
 # Doris document website
 
-The only working branch for this repository is `asf-site`, and it's mostly updated by travis' autobuild.
+This repo is for [Apache Doris(Incubating) website](https://doris.apache.org)
+
+And it use Github Action to automatically sync content from [Apache Doris(Incubating) Code Repo](https://github.com/apache/incubator-doris)
+
+There are 2 Github Actions:
+
+1. cron-deploy-website.yml
+
+    It will sync at 01:00 AM everyday from Doris's master branch.
+
+2. manual-deploy-website.yml
+
+    It can only be triggered manually, and you can specify the branch name you want to sync.
 
 ## View the website
 

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org