From 9bd861f6f89f5edf74716d8773128e4c32db05d0 Mon Sep 17 00:00:00 2001 From: Ayush Joshi Date: Tue, 14 Nov 2023 12:28:09 +0530 Subject: [PATCH] Run github-pages build only when changes are made to `docs` directory Signed-off-by: Ayush Joshi --- .github/workflows/docs.yml | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 68b731a..ea83e4e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,36 +2,15 @@ name: github-pages on: push: - branches: - - docs + paths: + - 'docs/**' permissions: actions: write contents: write jobs: - commit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - - run: pip install -r requirements.txt - - name: Adding executable permissions to manage.py - run: | - chmod +x ./tools/manage.py - - - name: Converting IPython Notebooks to Markdowns - run: | - ./tools/manage.py --generate-docs - - - uses: stefanzweifel/git-auto-commit-action@v4 - with: - branch: docs - commit_options: '--amend --no-edit' - push_options: '--force' - build: - needs: commit runs-on: ubuntu-latest steps: - uses: actions/checkout@v3