From 21f903d4bab4617f128208a54e3246d49a994215 Mon Sep 17 00:00:00 2001 From: Merve Noyan Date: Thu, 21 Sep 2023 17:36:27 +0200 Subject: [PATCH] Added check for initial case where launcher doesn't exist in main repo --- .github/workflows/autodocs.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/autodocs.yml b/.github/workflows/autodocs.yml index 59e1772fb15..30d648f0ac9 100644 --- a/.github/workflows/autodocs.yml +++ b/.github/workflows/autodocs.yml @@ -25,12 +25,19 @@ jobs: - 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 - output="${{ steps.run-launcher-help.outputs.output }}" - launcher_content=$(/docs/source/basic_tutorials/launcher.md) + 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