-
Notifications
You must be signed in to change notification settings - Fork 452
44 lines (37 loc) · 1.36 KB
/
deploy-versions-json.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: 更新历史版本列表
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
jobs:
deploy:
if: contains(github.event.head_commit.message, 'versions')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: 登录华为云
uses: huaweicloud/[email protected]
with:
access_key_id: ${{ secrets.ACCESSKEY }}
secret_access_key: ${{ secrets.SECRETACCESSKEY }}
region: 'cn-north-4'
- name: 上传文件到华为云 (测试环境)
if: contains(github.event.head_commit.message, 'test:versions')
uses: huaweicloud/obs-helper@master
with:
bucket_name: 'cce-creator-docs-test'
local_file_path: ./versions.json
obs_file_path: gitbook/creator/versions/versions.json
operation_type: upload
include_self_folder: false
- name: 上传文件到华为云(正式环境)
if: contains(github.event.head_commit.message, 'publish:versions')
uses: huaweicloud/obs-helper@master
with:
bucket_name: 'cce-creator-docs-pro'
local_file_path: ./versions.json
obs_file_path: gitbook/creator/versions/versions.json
operation_type: upload
include_self_folder: false