nocobase/.github/workflows/deploy-client-docs.yml
Zeke Zhang df0d3ddee3
perf(e2e): reduce e2e runtime (#4280)
* chore: reuse page instance

* refactor: optimize

* chore: revert

* chore: ignore workflows

* chore: upgrade playwright to 1.44.0

* chore: fix failed tests

* refactor: optimize e2eUtils

* chore: make tests pass

* chore: optimize workflow for e2e

* chore: fix fialed tests

* chore: optimize workflows

* chore: optimize

* chore: fix path

* chore: fix

* chore: test

* chore: fix

* chore: test

* chore: test

* chore: add bot for e2e

* chore: wait to revert

* chore: wait to revert

* chore: fix

* chore: fix

* chore: fix bot

* chore: test

* chore: ignore pro-plugins on PR author is not member

* chore: optimize

* chore: test

* chore: test

* chore: test bot

* chore: remove title link

* chore: fix

* chore: fix error and cache yarn

* chore: optimize md

* chore: add new workflows
2024-05-10 20:51:11 +08:00

54 lines
1.5 KiB
YAML

name: deploy client docs
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- 'main'
paths:
- 'packages/core/client/**'
- 'packages/core/client/docs/**'
- '.github/workflows/deploy-client-docs.yml'
pull_request:
branches:
- '**'
paths:
- 'packages/core/client/docs/**'
- '.github/workflows/deploy-client-docs.yml'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
- run: yarn --frozen-lockfile
- name: Build zh-CN
run: yarn doc build core/client --lang=zh-CN
- name: Build en-US
run: yarn doc build core/client --lang=en-US
- name: Set tags
id: set-tags
run: |
if [[ "${{ github.ref_name }}" == "main" ]]; then
echo "::set-output name=tags::${{ github.ref_name }}"
else
echo "::set-output name=tags::pr-${{ github.event.pull_request.number }}"
fi
- name: copy files via ssh - ${{ steps.set-tags.outputs.tags }}
uses: appleboy/scp-action@v0.1.4
with:
host: ${{ secrets.CN_CLIENT_HOST }}
username: ${{ secrets.CN_CLIENT_USERNAME }}
key: ${{ secrets.CN_CLIENT_KEY }}
port: ${{ secrets.CN_CLIENT_PORT }}
source: "packages/core/client/dist/*"
target: ${{ secrets.CN_CLIENT_TARGET }}/${{ steps.set-tags.outputs.tags }}