@@ -99,14 +99,29 @@ jobs:
99
99
- name : Set up pandas
100
100
uses : ./.github/actions/setup
101
101
102
+ # Github workflows built-in path filters
103
+ # don't work on a level of individual jobs or steps.
104
+ # So, we use this.
105
+ - uses : dorny/paths-filter@v2
106
+ id : changes
107
+ with :
108
+ filters : |
109
+ doc :
110
+ - ' doc/**'
111
+ web :
112
+ - ' web/**'
113
+
102
114
- name : Build website
103
115
run : |
104
116
source activate pandas-dev
105
117
python web/pandas_web.py web/pandas --target-path=web/build
118
+ if : steps.changes.outputs.web == 'true'
119
+
106
120
- name : Build documentation
107
121
run : |
108
122
source activate pandas-dev
109
123
doc/make.py --warnings-are-errors | tee sphinx.log ; exit ${PIPESTATUS[0]}
124
+ if : steps.changes.outputs.doc == 'true'
110
125
111
126
# This can be removed when the ipython directive fails when there are errors,
112
127
# including the `tee sphinx.log` in te previous step (https://github.com/ipython/ipython/issues/11547)
@@ -123,14 +138,15 @@ jobs:
123
138
124
139
- name : Upload web
125
140
run : rsync -az --delete --exclude='pandas-docs' --exclude='docs' --exclude='Pandas_Cheat_Sheet*' web/build/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas
126
- if : github.event_name == 'push'
141
+ if : ${{ github.event_name == 'push' && steps.changes.outputs.web == 'true' }}
127
142
128
143
- name : Upload dev docs
129
144
run : rsync -az --delete doc/build/html/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas/pandas-docs/dev
130
- if : github.event_name == 'push'
145
+ if : ${{ github.event_name == 'push' && steps.changes.outputs.doc == 'true' }}
131
146
132
147
- name : Move docs into site directory
133
148
run : mv doc/build/html web/build/docs
149
+
134
150
- name : Save website as an artifact
135
151
uses : actions/upload-artifact@v2
136
152
with :
0 commit comments