Hide grep output #16
Workflow file for this run
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
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 |