-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
on: | ||
push: | ||
branches: [ main ] # 当push代码到main分支时会自动触发action | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest # GitHub分配的运行平台,无需更改 | ||
steps: | ||
- uses: actions/checkout@v2 # 使用action库 actions/checkout获取源码,执行你的操作 | ||
with: | ||
persist-credentials: false | ||
ref: main | ||
submodules: true | ||
|
||
# 安装依赖 | ||
- name: Install Dependencies | ||
run: npm i | ||
|
||
# 打包 | ||
- name: Build | ||
run: npm run build | ||
|
||
# 安装lusun-scripts | ||
- name: Install lusun-scripts | ||
run: npm i -g @yuanze/lusun-scripts | ||
|
||
# 使用lusun-scripts部署到阿里云OSS | ||
- name: Deploy to OSS | ||
run: | | ||
lusun-scripts deploy \ | ||
--bucket docs-lusun-web \ | ||
--endpoint oss-cn-beijing.aliyuncs.com | ||
# 发送飞书通知 | ||
- name: Send Feishu Notification | ||
run: | | ||
lusun-scripts feishu \ | ||
'{"msg_type": "text", "content": {"text": "https://docs.lusun.com 发布完成"}}' |