Skip to content

Commit 952d238

Browse files
committed
[website] Add GitHub Action to automatically deploy website
1 parent 2b0f405 commit 952d238

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/docs-deploy.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
################################################################################
2+
# Copyright (c) 2025 Alibaba Group Holding Ltd.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
################################################################################
16+
name: Deploy Documentation
17+
on:
18+
push:
19+
branches: [main, release-*]
20+
paths:
21+
- 'website/**'
22+
23+
jobs:
24+
deploy:
25+
runs-on: ubuntu-latest
26+
defaults:
27+
run:
28+
working-directory: ./website
29+
steps:
30+
- uses: actions/checkout@v4
31+
with:
32+
fetch-depth: 0
33+
- name: Generate versioned docs
34+
run: ./build_versioned_docs.sh
35+
- uses: actions/setup-node@v4
36+
with:
37+
node-version: 18
38+
- name: Install dependencies
39+
run: npm install
40+
- name: Build website
41+
run: npm run build -- --no-minify
42+
- uses: webfactory/[email protected]
43+
with:
44+
ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }}
45+
- name: Deploy website
46+
env:
47+
USE_SSH: true
48+
run: |
49+
git config --global user.email "[email protected]"
50+
git config --global user.name "gh-actions"
51+
npm run deploy -- --skip-build

0 commit comments

Comments
 (0)