Skip to content

Commit 6393dbc

Browse files
committed
Fix gh-pages update script
1 parent 49df877 commit 6393dbc

File tree

2 files changed

+53
-48
lines changed

2 files changed

+53
-48
lines changed

.github/scripts/on-pages.sh

Lines changed: 53 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -85,53 +85,59 @@ function git_safe_upload_to_pages(){
8585
return $?
8686
}
8787

88-
EVENT_JSON=`cat $GITHUB_EVENT_PATH`
89-
90-
echo "GITHUB_EVENT_PATH: $GITHUB_EVENT_PATH"
91-
echo "EVENT_JSON: $EVENT_JSON"
92-
93-
pages_added=`echo "$EVENT_JSON" | jq -r '.commits[].added[]'`
94-
echo "added: $pages_added"
95-
pages_modified=`echo "$EVENT_JSON" | jq -r '.commits[].modified[]'`
96-
echo "modified: $pages_modified"
97-
pages_removed=`echo "$EVENT_JSON" | jq -r '.commits[].removed[]'`
98-
echo "removed: $pages_removed"
99-
100-
for page in $pages_added; do
101-
if [[ $page != "README.md" && $page != "docs/"* ]]; then
102-
continue
103-
fi
104-
echo "Adding '$page' to pages ..."
105-
if [[ $page == "README.md" ]]; then
106-
git_safe_upload_to_pages "index.md" "README.md"
107-
else
108-
git_safe_upload_to_pages "$page" "$page"
109-
fi
110-
done
111-
112-
for page in $pages_modified; do
113-
if [[ $page != "README.md" && $page != "docs/"* ]]; then
114-
continue
115-
fi
116-
echo "Modifying '$page' ..."
117-
if [[ $page == "README.md" ]]; then
118-
git_safe_upload_to_pages "index.md" "README.md"
119-
else
120-
git_safe_upload_to_pages "$page" "$page"
121-
fi
122-
done
123-
124-
for page in $pages_removed; do
125-
if [[ $page != "README.md" && $page != "docs/"* ]]; then
126-
continue
127-
fi
128-
echo "Removing '$page' from pages ..."
129-
if [[ $page == "README.md" ]]; then
130-
git_remove_from_pages "README.md" > /dev/null
131-
else
132-
git_remove_from_pages "$page" > /dev/null
133-
fi
134-
done
88+
git_safe_upload_to_pages "index.md" "README.md"
89+
90+
# At some point github stopped providing a list of edited file
91+
# but we also stopped havong documentation in md format,
92+
# so we can skip this portion safely and update just the index
93+
94+
# EVENT_JSON=`cat $GITHUB_EVENT_PATH`
95+
96+
# echo "GITHUB_EVENT_PATH: $GITHUB_EVENT_PATH"
97+
# echo "EVENT_JSON: $EVENT_JSON"
98+
99+
# pages_added=`echo "$EVENT_JSON" | jq -r '.commits[].added[]'`
100+
# echo "added: $pages_added"
101+
# pages_modified=`echo "$EVENT_JSON" | jq -r '.commits[].modified[]'`
102+
# echo "modified: $pages_modified"
103+
# pages_removed=`echo "$EVENT_JSON" | jq -r '.commits[].removed[]'`
104+
# echo "removed: $pages_removed"
105+
106+
# for page in $pages_added; do
107+
# if [[ $page != "README.md" && $page != "docs/"* ]]; then
108+
# continue
109+
# fi
110+
# echo "Adding '$page' to pages ..."
111+
# if [[ $page == "README.md" ]]; then
112+
# git_safe_upload_to_pages "index.md" "README.md"
113+
# else
114+
# git_safe_upload_to_pages "$page" "$page"
115+
# fi
116+
# done
117+
118+
# for page in $pages_modified; do
119+
# if [[ $page != "README.md" && $page != "docs/"* ]]; then
120+
# continue
121+
# fi
122+
# echo "Modifying '$page' ..."
123+
# if [[ $page == "README.md" ]]; then
124+
# git_safe_upload_to_pages "index.md" "README.md"
125+
# else
126+
# git_safe_upload_to_pages "$page" "$page"
127+
# fi
128+
# done
129+
130+
# for page in $pages_removed; do
131+
# if [[ $page != "README.md" && $page != "docs/"* ]]; then
132+
# continue
133+
# fi
134+
# echo "Removing '$page' from pages ..."
135+
# if [[ $page == "README.md" ]]; then
136+
# git_remove_from_pages "README.md" > /dev/null
137+
# else
138+
# git_remove_from_pages "$page" > /dev/null
139+
# fi
140+
# done
135141

136142
echo
137143
echo "DONE!"

.github/workflows/gh-pages.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
- pages
88
paths:
99
- 'README.md'
10-
- 'docs/**'
1110
- '.github/scripts/on-pages.sh'
1211
- '.github/workflows/gh-pages.yml'
1312

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy