From 0ae1aaff82ba700c4ce01e688f1fb236e040d680 Mon Sep 17 00:00:00 2001 From: Merve Noyan Date: Thu, 21 Sep 2023 18:26:38 +0200 Subject: [PATCH] Simplified --- .github/workflows/autodocs.yml | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/.github/workflows/autodocs.yml b/.github/workflows/autodocs.yml index 7ad668fa..16c08415 100644 --- a/.github/workflows/autodocs.yml +++ b/.github/workflows/autodocs.yml @@ -17,32 +17,12 @@ jobs: id: install-launcher run: cargo install --git https://github.com/huggingface/text-generation-inference.git text-generation-launcher - - name: Run TGI Launcher docs - id: run-launcher-help - run: | - output=$(text-generation-launcher --help) - echo "::set-output name=output::$output" - - name: Update Docs run: | - output="${{ steps.run-launcher-help.outputs.output }}" - if [ ! -f "docs/source/basic_tutorials/launcher.md" ]; then - touch docs/source/basic_tutorials/launcher.md - echo '```' >> docs/source/basic_tutorials/launcher.md - echo $output >> docs/source/basic_tutorials/launcher.md - echo '```' >> docs/source/basic_tutorials/launcher.md - echo "Docs are updated!" - git add launcher.md - git commit -m "Update launcher.md" - git push - fi - - launcher_content=$(docs/source/basic_tutorials/launcher.md) - if [ "$launcher_content" != "$output" ]; then - rm docs/source/basic_tutorials/launcher.md - echo '```' >> docs/source/basic_tutorials/launcher.md - echo $output >> docs/source/basic_tutorials/launcher.md - echo '```' >> docs/source/basic_tutorials/launcher.md + { echo '```'; $(text-generation-launcher --help); echo '```'; } > launcher_test.md + if diff launcher_test.md launcher.md; then + rm /docs/source/basic_tutorials/launcher.md + { echo '```'; $(text-generation-launcher --help); echo '```'; } > launcher.md echo "Docs are updated!" git add launcher.md git commit -m "Update launcher.md"