Update autodocs.yml #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Automatic Documentation for Launcher | |
on: | |
push: | |
branches: | |
- launcher_docs | |
jobs: | |
update_docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install Launcher | |
id: install-launcher | |
run: cargo install git+https://github.com/huggingface/text-generation-inference | |
- 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 }}" | |
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 "Docs are updated!" | |
git add launcher.md | |
git commit -m "Update launcher.md" | |
git push |