Skip to content

Commit

Permalink
deploy to cn
Browse files Browse the repository at this point in the history
  • Loading branch information
hotlong committed Apr 25, 2024
1 parent 5049626 commit 21bdcb4
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 19 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/deploy-cn.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Deploy steedos.cn

on:
push:
tags: # Deploy tag (e.g. v1.0) to production
- 'v**'
branches:
- 'beta'

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install dependencies
run: yarn install

- name: Build Docusaurus site
run: yarn build:cn

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: cn-northwest-1

- name: Deploy to S3
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: docs-steedos-cn
AWS_S3_REGION: cn-northwest-1
SOURCE_DIR: ./build/

- name: Invalidate CloudFront distribution
run: |
aws cloudfront create-invalidation --distribution-id E2XLZVP0KTH5PI --paths "/*"
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,22 @@ This command generates static content into the `build` directory and can be serv

## Release

### 发布正式版
### 发布多语言版

在main分支创建tag,发布正式版到 https://docs.steedos.com

```
yarn build
```

### 发布中文版

在main分支创建tag,发布正式版到 https://docs.steedos.cn

```
yarn build --locale zh-CN
```

### 发布测试版

更新beta分支,发布测试版到 https://docs-beta.steedos.com
Expand Down
36 changes: 18 additions & 18 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ const config = {
disableSwitch: true,
respectPrefersColorScheme: false,
},
announcementBar: {
id: 'support_us',
content:
'⭐️ If you like Steedos, give a star on <a target="_blank" rel="noopener noreferrer" href="https://github.com/steedos/steedos-platform">GitHub</a>.',
backgroundColor: '#4D72DA',
textColor: '#ffffff',
isCloseable: true,
},
// announcementBar: {
// id: 'support_us',
// content:
// '⭐️ If you like Steedos, give a star on <a target="_blank" rel="noopener noreferrer" href="https://github.com/steedos/steedos-platform">GitHub</a>.',
// backgroundColor: '#4D72DA',
// textColor: '#ffffff',
// isCloseable: true,
// },
navbar: {
title: 'Steedos',
logo: {
Expand All @@ -118,20 +118,20 @@ const config = {
{
type: 'docSidebar',
position: 'left',
sidebarId: 'platform',
label: 'Docs',
sidebarId: 'solutions',
label: 'Solutions',
},
{
type: 'docSidebar',
position: 'left',
sidebarId: 'developer',
label: 'Developer',
sidebarId: 'platform',
label: 'Docs',
},
{
type: 'docSidebar',
position: 'left',
sidebarId: 'solutions',
label: 'Solutions',
sidebarId: 'developer',
label: 'Developer',
},
{
type: 'search',
Expand All @@ -141,10 +141,10 @@ const config = {
// type: 'docsVersionDropdown',
// position: 'right',
// },
{
type: 'localeDropdown',
position: 'right',
},
// {
// type: 'localeDropdown',
// position: 'right',
// },
{
href: 'https://github.com/steedos/steedos-platform',
position: 'right',
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"start": "docusaurus start",
"start:cn": "docusaurus start --locale zh-CN",
"build": "docusaurus build",
"build:cn": "docusaurus build --locale zh-CN",
"build:openapi": "redocly build-docs openapi/records.yaml -o static/openapi/records/index.html",
"build:openapi:cn": "redocly build-docs openapi/zh-CN/records.yaml -o static/zh-CN/openapi/records/index.html",
"swizzle": "docusaurus swizzle",
Expand Down

0 comments on commit 21bdcb4

Please sign in to comment.