[CDN] Upload files to OSS (#51)
diff --git a/.github/workflows/manual-deploy-website.yml b/.github/workflows/manual-deploy-website.yml
index 9cd93d4..c51ecfe 100644
--- a/.github/workflows/manual-deploy-website.yml
+++ b/.github/workflows/manual-deploy-website.yml
@@ -11,6 +11,7 @@
jobs:
build-and-deploy:
runs-on: ubuntu-latest
+ environment: Production
steps:
- name: Checkout
uses: actions/checkout@master
@@ -37,6 +38,17 @@
touch build/.dummy
ls build
export DORIS_COMMIT=`git rev-parse HEAD`
+
+ - name: Upload files to OSS
+ uses: fangbinwei/aliyun-oss-website-action@v1
+ 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 +70,7 @@
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/README.md b/README.md
index d55a182..cb3c1d5 100644
--- a/README.md
+++ b/README.md
@@ -38,6 +38,9 @@
To view the website, navigate to
[https://doris.apache.org](https://doris.apache.org)
+## How to deploy your own Doris Website by Vercel
+[How to deploy your own Doris Website by Vercel](./repo-docs/How-to-deploy-your-own-website-by-Vercel.md)
+
## Run & Build Website
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
@@ -358,6 +361,9 @@
## 修改文档(中文版)
+### 通过托管服务 Vercel 部署自己的 Doris Website 站点
+[通过托管服务 Vercel 部署自己的 Doris Website 站点](./repo-docs/How-to-deploy-your-own-website-by-Vercel.md).
+
### website目录结构
```
diff --git a/repo-docs/How-to-deploy-your-own-website-by-Vercel.md b/repo-docs/How-to-deploy-your-own-website-by-Vercel.md
new file mode 100644
index 0000000..2b3971c
--- /dev/null
+++ b/repo-docs/How-to-deploy-your-own-website-by-Vercel.md
@@ -0,0 +1,38 @@
+# How to deploy your own Doris Website by Vercel
+
+### Step1: Fork Doris-Website 仓库 https://github.com/apache/doris-website
+### Step2: 打开 https://vercel.com 点击 Login,使用 Github 登录
+<img src="./images/vercel%20portal.png" width="600" alt="create a new project">
+</br>
+<img src="./images/login-with-github.png" width="600" alt="create a new project">
+</br>
+
+### Step3: 创建新项目
+<img src="./images/create%20a%20new%20project.png" width="600" alt="create a new project">
+</br>
+
+### Step4: 选择 Fork 的组织
+<img src="./images/find%20your%20forked%20repo.png" width="600" alt="create a new project">
+</br>
+<img src="./images/install%20vercel.png" width="600" alt="create a new project">
+</br>
+<img src="./images/install%20vercel%202.png" width="600" alt="create a new project">
+</br>
+
+### Step5: 部署项目
+<img src="./images/import%20your%20forked%20repo.png" width="600" alt="create a new project">
+</br>
+<img src="./images/deploy%20your%20website.png" width="600" alt="create a new project">
+</br>
+
+### Finish: 完成并获取官网链接
+<img src="./images/get%20your%20own%20domain.png" width="600" alt="create a new project">
+</br>
+
+### 文档数量较多,部署时间大概在20min左右,请耐心等待。
+
+
+### 部署完成后会获得一个域名,点击就可以直接访问了
+
+
+### 注意:fork 的站点不能和Doris官网同步,需要手动 Merge Upstream 或者编写自动同步脚本,当commit 被合入到 fork 的仓库后,Vercel 会自动部署包含最新 commit 的网站。
\ No newline at end of file
diff --git a/repo-docs/images/create a new project.png b/repo-docs/images/create a new project.png
new file mode 100644
index 0000000..2b9b2e5
--- /dev/null
+++ b/repo-docs/images/create a new project.png
Binary files differ
diff --git a/repo-docs/images/deploy your website.png b/repo-docs/images/deploy your website.png
new file mode 100644
index 0000000..7e25f04
--- /dev/null
+++ b/repo-docs/images/deploy your website.png
Binary files differ
diff --git a/repo-docs/images/find your forked repo.png b/repo-docs/images/find your forked repo.png
new file mode 100644
index 0000000..15f22f1
--- /dev/null
+++ b/repo-docs/images/find your forked repo.png
Binary files differ
diff --git a/repo-docs/images/get your own domain.png b/repo-docs/images/get your own domain.png
new file mode 100644
index 0000000..3f5082f
--- /dev/null
+++ b/repo-docs/images/get your own domain.png
Binary files differ
diff --git a/repo-docs/images/import your forked repo.png b/repo-docs/images/import your forked repo.png
new file mode 100644
index 0000000..1424197
--- /dev/null
+++ b/repo-docs/images/import your forked repo.png
Binary files differ
diff --git a/repo-docs/images/install vercel 2.png b/repo-docs/images/install vercel 2.png
new file mode 100644
index 0000000..864de83
--- /dev/null
+++ b/repo-docs/images/install vercel 2.png
Binary files differ
diff --git a/repo-docs/images/install vercel.png b/repo-docs/images/install vercel.png
new file mode 100644
index 0000000..bbc6213
--- /dev/null
+++ b/repo-docs/images/install vercel.png
Binary files differ
diff --git a/repo-docs/images/login-with-github.png b/repo-docs/images/login-with-github.png
new file mode 100644
index 0000000..40accb3
--- /dev/null
+++ b/repo-docs/images/login-with-github.png
Binary files differ
diff --git a/repo-docs/images/vercel portal.png b/repo-docs/images/vercel portal.png
new file mode 100644
index 0000000..d7cc4ab
--- /dev/null
+++ b/repo-docs/images/vercel portal.png
Binary files differ