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

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


The following commit(s) were added to refs/heads/master by this push:
     new b602157c183 [CDN] Use aliyun-oss-website-action in our repo (#58)
b602157c183 is described below

commit b602157c183c76537f7ed0a97e3cb37b9cf96877
Author: Jeffrey <color.d...@gmail.com>
AuthorDate: Mon Aug 22 11:45:00 2022 +0800

    [CDN] Use aliyun-oss-website-action in our repo (#58)
    
    Use aliyun-oss-website-action in our repo
---
 .github/workflows/actions/aliyun-oss-website-action |  1 +
 .github/workflows/manual-deploy-website.yml         | 18 +++++++++++++++++-
 .gitmodules                                         |  3 +++
 3 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/actions/aliyun-oss-website-action 
b/.github/workflows/actions/aliyun-oss-website-action
new file mode 160000
index 00000000000..eefa35a2bb1
--- /dev/null
+++ b/.github/workflows/actions/aliyun-oss-website-action
@@ -0,0 +1 @@
+Subproject commit eefa35a2bb18c61ff710bb603a253c4a0ca582a9
diff --git a/.github/workflows/manual-deploy-website.yml 
b/.github/workflows/manual-deploy-website.yml
index 9cd93d454bf..5fffc2e242c 100644
--- a/.github/workflows/manual-deploy-website.yml
+++ b/.github/workflows/manual-deploy-website.yml
@@ -1,4 +1,4 @@
-name: Manual Deploy
+name: Manual Deploy And Upload To OSS
 
 on: 
   workflow_dispatch:
@@ -11,9 +11,13 @@ on:
 jobs:
   build-and-deploy:
     runs-on: ubuntu-latest
+    environment: Production
     steps:
     - name: Checkout
       uses: actions/checkout@master
+      with:
+          persist-credentials: false
+          submodules: recursive
 
     - name: Use Node.js
       uses: actions/setup-node@v1
@@ -37,6 +41,17 @@ jobs:
         touch build/.dummy
         ls build
         export DORIS_COMMIT=`git rev-parse HEAD`
+
+    - name: Upload files to OSS
+      uses: ./.github/actions/aliyun-oss-website-action
+      with:
+          accessKeyId: ${{ secrets.ALIYUN_ACCESS_KEY_ID }}
+          accessKeySecret: ${{ secrets.ALIYUN_ACCESS_KEY_SECRET }}
+          bucket: ${{ secrets.ALIYUN_OSS_BUCKET }}
+          # use your own endpoint
+          endpoint: ${{ secrets.ALIYUN_OSS_ENDPOINT }}
+          folder: build
+
     - name: Deploy website
       if: ${{ github.event.inputs.branch == 'master' }}
       run: |
@@ -58,6 +73,7 @@ jobs:
         git add .
         git commit -m "Automated deployment with doris master"
         git push --verbose "https://${{ secrets.GITHUB_TOKEN 
}}@github.com/apache/doris-website.git" asf-site:asf-site
+        
     - name: Deploy Branch
       if: ${{ github.event.inputs.branch != 'master' }}
       uses: peaceiris/actions-gh-pages@v3
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 00000000000..40d7771241e
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule ".github/workflows/actions/aliyun-oss-website-action"]
+       path = .github/workflows/actions/aliyun-oss-website-action
+       url = https://github.com/fangbinwei/aliyun-oss-website-action.git


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

Reply via email to