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.
42 lines
1.2 KiB
42 lines
1.2 KiB
name: Publish Docs |
|
|
|
on: |
|
push: |
|
branches: [ master ] |
|
|
|
jobs: |
|
copy-file: |
|
runs-on: ubuntu-latest |
|
steps: |
|
- name: Checkout |
|
uses: actions/checkout@v2 |
|
with: |
|
fetch-depth: 0 |
|
- name: Check for update |
|
run: | |
|
echo "CHANGED=$([[ $(lerna ls --since ${{github.event.before}} | grep noco-docs) = noco-docs ]] && 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-docs |
|
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-docs/dist/' |
|
destination_repo: 'nocodb/noco-docs' |
|
destination_folder: 'docs' |
|
user_email: 'oof1lab@gmail.com' |
|
user_name: 'o1lab' |
|
commit_message: 'Autorelease from github.com/nocodb/nocodb/packages/noco-docs' |