[docs] Fix typos (#358) #16
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
# Generate PySceneDetect documentation. Inputs are currently <commit_ref> <output_dir>, where | |
# <commit_ref> is what commit/branch/tag to use for the build, and <output_dir> is the same as | |
# scenedetect.com/docs/<output_dir> | |
name: Generate Documentation | |
on: | |
push: | |
branches: | |
- main | |
- 'releases/**' | |
paths: | |
- 'docs/**' | |
workflow_dispatch: | |
jobs: | |
update_docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
cache: 'pip' | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip build wheel virtualenv | |
pip install -r docs/requirements.txt | |
- name: Set Destination (Latest) | |
if: ${{ github.ref_name == 'main' }} | |
run: | | |
echo "scenedetect_docs_dest=latest" >> "$GITHUB_ENV" | |
- name: Set Destination (Releases) | |
if: ${{ github.ref_name != 'main' }} | |
run: | | |
echo "scenedetect_docs_dest=$(echo ${{ github.ref_name }} | cut -b 10-)" >> "$GITHUB_ENV" | |
- name: Generate Docs | |
run: | | |
sphinx-build -b html docs build | |
- name: Add/Update Docs | |
run: | | |
git fetch origin gh-pages | |
git checkout gh-pages | |
git rm "docs/${{ env.scenedetect_docs_dest }}" -r -f --ignore-unmatch | |
git add build/ | |
git mv build "docs/${{ env.scenedetect_docs_dest }}" | |
git config --global user.name github-actions | |
git config --global user.email [email protected] | |
git commit -a -m "[docs] @${{ github.triggering_actor }}: Generate Documentation" \ | |
-m "Source: ${{ github.ref_name }} (${{ github.sha }})" \ | |
-m "Destination: ${{ env.scenedetect_docs_dest }}" | |
git push |