diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index bcefca100..4dadbbf26 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -9,23 +9,23 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: dorny/paths-filter@v2 + - name: Check if docs changed id: changes - with: - filters: | - docs: - - 'docs/**' + run: | + git fetch origin main + 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.src == 'true' + if: steps.changes.outputs.docs == 'true' with: python-version: 3.x - name: Install Poetry - if: steps.changes.outputs.src == 'true' + 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.src == 'true' + if: steps.changes.outputs.docs == 'true' run: poetry run mkdocs gh-deploy --force