Skip to content

Update fetch

Update fetch #12

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
git diff --quiet origin/main -- docs
echo ::set-output name=docs::$(test $? -ne 0 && echo 'true' || echo 'false')
- 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