Skip to content

Update command

Update command #14

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 ::set-output name=docs::$(git show --name-only --oneline | grep docs/ && 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