Skip to content

Commit

Permalink
build docs on PRs where docs change
Browse files Browse the repository at this point in the history
  • Loading branch information
hrodmn committed Jan 7, 2025
1 parent 627eb2b commit fb32348
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/deploy_mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,20 @@ on:
branches:
- main
paths:
# Only rebuild website when docs have changed
- 'README.md'
- 'CHANGELOG.md'
- 'CONTRIBUTING.md'
- 'docs/**'
pull_request:
paths:
- 'README.md'
- 'CHANGELOG.md'
- 'CONTRIBUTING.md'
- 'docs/**'

jobs:
build:
name: Deploy docs
docs:
name: ${{ github.event_name == 'push' && 'Deploy docs' || 'Build docs' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -28,5 +33,10 @@ jobs:
python -m pip install --upgrade pip
python -m pip install mkdocs mkdocs-material mkdocs-jupyter pandas seaborn folium
- name: Build docs
if: github.event_name == 'pull_request'
run: mkdocs build -f docs/mkdocs.yml

- name: Deploy docs
if: github.event_name == 'push'
run: mkdocs gh-deploy --force -f docs/mkdocs.yml

0 comments on commit fb32348

Please sign in to comment.