File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 66 push :
77 branches : ["main"]
88
9- # Allows you to run this workflow manually from the Actions tab
9+ # Renew the Public Suffix List on schedule or manually
10+ schedule :
11+ - cron : ' 12 3 * * *'
1012 workflow_dispatch :
1113
1214# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
@@ -33,10 +35,16 @@ jobs:
3335
3436 - name : Download Public Suffix List
3537 run : |
36- urls=(
37- "https://upa-url.github.io/demo/public_suffix_list.dat"
38- "https://publicsuffix.org/list/public_suffix_list.dat"
39- )
38+ if [ "${{ github.event_name }}" = "push" ]; then
39+ # First, try using the same file
40+ urls=(
41+ "https://upa-url.github.io/demo/public_suffix_list.dat"
42+ "https://publicsuffix.org/list/public_suffix_list.dat"
43+ )
44+ else
45+ # Renew file from source
46+ urls=("https://publicsuffix.org/list/public_suffix_list.dat")
47+ fi
4048 for u in "${urls[@]}"; do
4149 if curl -fsS -o public/demo/public_suffix_list.dat "$u"; then
4250 break
You can’t perform that action at this time.
0 commit comments