mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 05:36:05 +00:00
fix: docs ci (#2976)
This commit is contained in:
parent
f1e387e65e
commit
2f7c5fcb4b
27
.github/workflows/deploy-client-docs.yml
vendored
27
.github/workflows/deploy-client-docs.yml
vendored
@ -1,5 +1,18 @@
|
||||
name: deploy client docs
|
||||
on: [push]
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
paths:
|
||||
- 'packages/core/client/**'
|
||||
- '.github/workflows/deploy-client-docs.yml'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
paths:
|
||||
- 'packages/core/client/**'
|
||||
- '.github/workflows/deploy-client-docs.yml'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
@ -12,7 +25,15 @@ jobs:
|
||||
- run: yarn install
|
||||
- name: Build
|
||||
run: yarn doc build core/client
|
||||
- name: copy files via ssh
|
||||
- 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 }}
|
||||
@ -20,4 +41,4 @@ jobs:
|
||||
key: ${{ secrets.CN_CLIENT_KEY }}
|
||||
port: ${{ secrets.CN_CLIENT_PORT }}
|
||||
source: "packages/core/client/dist/*"
|
||||
target: ${{ secrets.CN_CLIENT_TARGET }}/${{ github.ref_name }}
|
||||
target: ${{ secrets.CN_CLIENT_TARGET }}/${{ steps.set-tags.outputs.tags }}
|
||||
|
Loading…
Reference in New Issue
Block a user