Skip to content

Commit 51f8808

Browse files
committed
ci(docs): Only publish when files update
1 parent 255a051 commit 51f8808

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/publish-docs.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,26 @@ jobs:
1717
run: |
1818
git config --global user.name 'travis-ci'
1919
git config --global user.email '[email protected]'
20+
21+
- name: Filter changed file paths to outputs
22+
uses: dorny/[email protected]
23+
id: changes
24+
with:
25+
filters: |
26+
root_docs:
27+
- CHANGES
28+
- README.*
29+
docs:
30+
- 'docs/**/*.rst'
31+
- 'docs/**/*.md'
32+
- 'examples/**'
33+
python_files:
34+
- 'vcspull/**'
35+
36+
- name: Should publish
37+
if: steps.changes.outputs.docs == 'true' || steps.changes.outputs.root_docs == 'true' || steps.changes.outputs.python_files == 'true'
38+
run: echo "PUBLISH=$(echo true)" >> $GITHUB_ENV
39+
2040
- name: Set up Python ${{ matrix.python-version }}
2141
uses: actions/setup-python@v1
2242
with:

0 commit comments

Comments
 (0)