Skip to content

Commit ce67846

Browse files
feat: add workflow to build cn website (#812)
Co-authored-by: copy rogers <[email protected]>
1 parent 6bf108e commit ce67846

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/deploy-cn.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: cloudwego.cn deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-22.04
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
submodules: recursive
14+
fetch-depth: 1
15+
- name: Setup Hugo
16+
uses: peaceiris/actions-hugo@v2
17+
with:
18+
hugo-version: "0.119.0"
19+
extended: true
20+
- name: Setup Node
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: "18"
24+
25+
- name: Cache dependencies
26+
uses: actions/cache@v1
27+
with:
28+
path: ~/.npm
29+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
30+
restore-keys: |
31+
${{ runner.os }}-node-
32+
- run: npm install
33+
- run: HUGO_ENV=production hugo --minify --verbose -b http://cloudwego.cn
34+
- name: upload to oss
35+
uses: doggycool/ossutil-github-action@master
36+
with:
37+
ossArgs: "cp -r -u public oss://cloudwego-website-cn"
38+
accessKey: ${{ secrets.ACCESS_KEYID }}
39+
accessSecret: ${{ secrets.ACCESS_KEYSECRET }}
40+
endpoint: oss-cn-beijing.aliyuncs.com

0 commit comments

Comments
 (0)