Update the script.

This commit is contained in:
Nicolas Patry 2023-09-27 09:13:32 +00:00
parent 6bc580d5bb
commit 6de3b949d8

View File

@ -1,6 +1,9 @@
name: Automatic Documentation for Launcher name: Automatic Documentation for Launcher
on: [push] on:
# TODO remove this before merging
push:
pull_request:
jobs: jobs:
update_docs: update_docs:
@ -12,14 +15,11 @@ jobs:
- name: Install Launcher - name: Install Launcher
id: install-launcher id: install-launcher
run: cargo install --git git+https://github.com/${github.event.actor_id}/text-generation-inference.git --branch ${github.head_ref} text-generation-launcher run: cargo install --git git+https://github.com/${{ github.repository }}/text-generation-inference.git --branch ${{ github.head_ref }} text-generation-launcher
- name: Update Docs - name: Update Docs
run: | run: |
echo text-generation-launcher --help echo text-generation-launcher --help
output=$(text-generation-launcher --help) output=$(text-generation-launcher --help)
{ echo '```'; echo $output; echo '```'; } > launcher_test.md { echo '```'; echo $output; echo '```'; } > launcher_test.md
if diff launcher_test.md docs/source/basic_tutorials/launcher.md; then diff launcher_test.md docs/source/basic_tutorials/launcher.md
echo "Docs aren't updated, update them!"
exit 1
fi