Files
cocos-docs/.github/workflows/deploy-versions-json.yml
2026-04-29 10:38:27 +08:00

36 lines
1.2 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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