mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.1 KiB
40 lines
1.1 KiB
name: Publish Book |
|
|
|
on: |
|
push: |
|
branches: [ master ] |
|
|
|
jobs: |
|
copy-file: |
|
runs-on: ubuntu-latest |
|
steps: |
|
- name: Checkout |
|
uses: actions/checkout@v2 |
|
- name: Check for change |
|
run: | |
|
echo "CHANGED=$([[ $(git log --pretty=format:'%h' -n 1 --skip 1 | xargs lerna ls --since | grep noco-book) = noco-book ]] && echo 'OK')" >> $GITHUB_ENV |
|
|
|
- uses: actions/setup-node@v2 |
|
if: ${{ env.CHANGED == 'OK' }} |
|
with: |
|
node-version: 14 |
|
- name: Build docs |
|
if: ${{ env.CHANGED == 'OK' }} |
|
run: | |
|
cd packages/noco-book |
|
npm install |
|
npm run generate |
|
|
|
|
|
- name: Pushes generated output |
|
if: ${{ env.CHANGED == 'OK' }} |
|
uses: dmnemec/copy_file_to_another_repo_action@main |
|
env: |
|
API_TOKEN_GITHUB: ${{ secrets.GH_TOKEN }} |
|
with: |
|
source_file: 'packages/noco-book/dist/' |
|
destination_repo: 'nocodb/noco-book' |
|
destination_folder: 'docs' |
|
user_email: 'oof1lab@gmail.com' |
|
user_name: 'o1lab' |
|
commit_message: 'Autorelease from github.com/nocodb/nocodb/packages/noco-book' |