mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-10 20:04:52 +00:00
Automatic docs for TGI
This commit is contained in:
parent
36c2868853
commit
ebfea7205c
41
.github/workflows/autodocs.yml
vendored
Normal file
41
.github/workflows/autodocs.yml
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
name: Automatic Documentation for Launcher
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- launcher_docs
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update_docs:
|
||||||
|
if: github.event.pull_request.merged == true
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install Launcher
|
||||||
|
id: install-launcher
|
||||||
|
run: |
|
||||||
|
cd launcher
|
||||||
|
cargo build
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
- 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 }}"
|
||||||
|
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
|
Loading…
Reference in New Issue
Block a user