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'