File tree Expand file tree Collapse file tree 1 file changed +0
-18
lines changed Expand file tree Collapse file tree 1 file changed +0
-18
lines changed Original file line number Diff line number Diff line change 69
69
AWS_REGION : " us-west-1" # optional: defaults to us-east-1
70
70
SOURCE_DIR : " docs/_build/html" # optional: defaults to entire repository
71
71
72
- - name : Generate list of changed files for CloudFront to invalidate
73
- run : |
74
- FILES=$(find docs/_build/html -exec realpath --relative-to docs/_build/html {} \; | awk '{print "/"$0}' | grep "html\|searchindex.js\|custom.css\|.svg");
75
- for file in $FILES; do
76
- echo $file
77
- # add bare directory to list of updated paths when we see index.html
78
- [[ "$file" == *"/index.html" ]] && echo $file | sed -e 's/\/index.html$/\//'
79
- done | sort | uniq | tr '\n' ' ' > .updated_files
80
-
81
- - name : Invalidate on CloudFront
82
- uses : chetan/invalidate-cloudfront-action@v2.3
83
- env :
84
- DISTRIBUTION : ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION }}
85
- AWS_REGION : " us-east-1"
86
- AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
87
- AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
88
- PATHS_FROM : .updated_files
89
-
90
72
- name : Purge cache on Cloudflare
91
73
uses : jakejarvis/cloudflare-purge-action@v0.3.0
92
74
env :
You can’t perform that action at this time.
0 commit comments