-
Notifications
You must be signed in to change notification settings - Fork 698
36 lines (30 loc) · 1.24 KB
/
deploy-versions-json.yml
File metadata and controls
36 lines (30 loc) · 1.24 KB
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
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: 配置火山云 TOS 凭证
run: |
aws configure set aws_access_key_id ${{ secrets.ACCESSKEY }}
aws configure set aws_secret_access_key ${{ secrets.SECRETACCESSKEY }}
aws configure set default.region cn-beijing
- name: 上传文件到火山云 TOS (测试环境)
if: contains(github.event.head_commit.message, 'test:versions')
run: |
aws s3 cp ./versions.json s3://cocoscreator-docs-test/gitbook/creator/versions/versions.json \
--endpoint-url https://tos-s3-cn-beijing.volces.com \
--addressing-style virtual
- name: 上传文件到火山云 TOS(正式环境)
if: contains(github.event.head_commit.message, 'publish:versions')
run: |
aws s3 cp ./versions.json s3://cocoscreator-docs-pro/gitbook/creator/versions/versions.json \
--endpoint-url https://tos-s3-cn-beijing.volces.com \
--addressing-style virtual