Skip to content

documentation.yaml: only create on master branch #99

documentation.yaml: only create on master branch

documentation.yaml: only create on master branch #99

name: Docs
on:
push
branches:

Check failure on line 4 in .github/workflows/documentation.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/documentation.yaml

Invalid workflow file

You have an error in your yaml syntax on line 4
- master
permissions:
contents: write
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# So we can find out the version information for the docs
fetch-depth: 0
- uses: actions/setup-python@v3
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install recommonmark sphinx sphinx_rtd_theme sphinxcontrib.aafig
# tbot dependencies
pip install --user pytest mypy paramiko termcolor2 pyserial coverage pytest-cov
# for unknown reasons termcolor2 get not found
# but Install step shows, that it is installed
export PYTHONPATH=/home/runner/.local/lib/python3.7/site-packages
mkdir temp
cd temp
# set some git default values so git am works
git config --global user.email "[email protected]"
git config --global user.name "Heiko Schocher"
../scripts/create_setup.sh
- name: Sphinx build
run: |
CP=$(pwd)
export PYTHONPATH=${CP}/temp/tbot:/home/runner/.local/lib/python3.7/site-packages
cd temp/tbottest
./Documentation/build-docs.sh
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./temp/tbottest/Documentation/output
force_orphan: true