Skip to content

Hide grep output

Hide grep output #16

Workflow file for this run

name: Build and publish docs
on:
push:
branches:
- main
- add-docs
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check if docs changed
id: changes
run: |
git fetch --all
echo "docs=$(git show --name-only --oneline | grep docs/ > /dev/null && echo true || echo false)" >> $GITHUB_OUTPUT
- uses: actions/setup-python@v2
if: steps.changes.outputs.docs == 'true'
with:
python-version: 3.x
- name: Install Poetry
if: steps.changes.outputs.docs == 'true'
run: |
pip install -U pip
pip install poetry
poetry config virtualenvs.create false
poetry install --with docs
- name: Deploy to GitHub Pages
if: steps.changes.outputs.docs == 'true'
run: poetry run mkdocs gh-deploy --force