File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -105,18 +105,24 @@ jobs:
105
105
106
106
- name : Generate list of changed files for CloudFront to invalidate
107
107
run : |
108
- pushd docs/_build/html; FILES=$(find . -name \* -print | grep html | cut -c2- | sort | uniq | tr '\n' ' '); popd
108
+ FILES=$(find docs/_build/html -exec realpath --relative-to docs/_build/ html {} \; | awk '{print "/"$0}' | grep "html\|searchindex.js\|custom.css\|.svg");
109
109
for file in $FILES; do
110
110
echo $file
111
111
# add bare directory to list of updated paths when we see index.html
112
112
[[ "$file" == *"/index.html" ]] && echo $file | sed -e 's/\/index.html$/\//'
113
113
done | sort | uniq | tr '\n' ' ' > .updated_files
114
114
115
115
- name : Invalidate on CloudFront
116
- uses : chetan/invalidate-cloudfront-action@master
116
+ uses : chetan/invalidate-cloudfront-action@v2.3
117
117
env :
118
118
DISTRIBUTION : ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION }}
119
119
AWS_REGION : " us-east-1"
120
120
AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
121
121
AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
122
122
PATHS_FROM : .updated_files
123
+
124
+ - name : Purge cache on Cloudflare
125
+ uses : jakejarvis/cloudflare-purge-action@v0.3.0
126
+ env :
127
+ CLOUDFLARE_TOKEN : ${{ secrets.CLOUDFLARE_TOKEN }}
128
+ CLOUDFLARE_ZONE : ${{ secrets.CLOUDFLARE_ZONE }}
You can’t perform that action at this time.
0 commit comments