mirror of
https://github.com/cocos/cocos-docs.git
synced 2026-06-02 07:49:32 +08:00
36 lines
1.2 KiB
YAML
36 lines
1.2 KiB
YAML
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
|
||
aws configure set default.s3.addressing_style virtual
|
||
|
||
- 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
|
||
|
||
- 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
|