Skip to content

feat(ml): jenkins test inference print #491

feat(ml): jenkins test inference print

feat(ml): jenkins test inference print #491

name: Doc auto generation
on:
push:
branches: [master]
jobs:
Explore-GitHub-Actions:
runs-on: ubuntu-latest
steps:
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.8 #install the python needed
- name: checkout
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- name: install req
run: |
pip install -r ./requirements.txt
pip install fastapi uvicorn opencv-python-headless
sudo wget https://github.com/jgm/pandoc/releases/download/3.1.3/pandoc-3.1.3-1-amd64.deb
sudo dpkg -i pandoc-3.1.3-1-amd64.deb
- name: update
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- name: run script
run: python ./scripts/generate_doc.py
- name: convert md to rst
run: |
cp docs/options.md docs/options_copy.md
file="docs/options_copy.md"
contents=$(cat "$file")
double_dash_contents=$(echo "$contents" | sed 's/\([^-\]\)--\([^-\]\)/\1\\--\2/g')
new_contents=$(echo "$double_dash_contents" | sed 's/\\|/,/g')
echo "$new_contents" > "$file"
pandoc --from markdown --to rst --standalone --wrap=none -s $file -o docs/source/options.rst
rm $file
- name: generate api doc
run: bash ./scripts/generate_api_doc.sh
- name: push
if: ${{ !env.ACT }}
run: |
git config user.name github-actions-jg
git config user.email [email protected]
git add .
git diff-index --quiet HEAD || (git commit -m "doc: options auto update" && git push)