Merge branch 'feat-website-adjust' of github.com:datafuselabs/databen… #1283
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: [main] | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
cn: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
- run: corepack enable | |
- run: | | |
yarn install | |
yarn build:cn | |
- name: Configure Aliyun credentials | |
id: aliyun | |
uses: mozillazg/alibabacloud-oidc-auth@v1 | |
with: | |
role-arn-to-assume: acs:ram::1953761221157405:role/docs | |
region: cn-beijing | |
role-session-name: github-actions-${{ github.run_id }} | |
oidc-provider-arn: acs:ram::1953761221157405:oidc-provider/github | |
set-outputs: "true" | |
- name: Configure AWS CLI | |
run: aws configure set default.s3.addressing_style virtual | |
- name: Sync to OSS | |
env: | |
AWS_ENDPOINT_URL: https://oss-cn-beijing.aliyuncs.com | |
AWS_ACCESS_KEY_ID: ${{ steps.aliyun.outputs.access-key-id }} | |
AWS_SECRET_ACCESS_KEY: ${{ steps.aliyun.outputs.access-key-secret }} | |
AWS_SESSION_TOKEN: ${{ steps.aliyun.outputs.security-token }} | |
AWS_REGION: cn-beijing | |
run: | | |
aws s3 sync ./build/ s3://databend-docs/ --no-progress |