File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 6666 if : github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'schedule') && github.repository == 'rust-osdev/homepage'
6767 permissions :
6868 contents : write
69+ issues : write
6970
7071 steps :
7172 - name : " Download Generated Site"
@@ -99,6 +100,17 @@ jobs:
99100 git commit --allow-empty -m "Deploy ${GITHUB_SHA}
100101
101102 Deploy of commit https://github.com/rust-osdev/homepage/commit/${GITHUB_SHA}"
103+
104+ if git show HEAD --summary | grep -P 'create mode \d+ this-month/\d{4}-\d{2}/index.html'
105+ then
106+ # This might do something weird if there are multiple such pages. Hopefully that should never happen.
107+ new_page=$(git show HEAD --summary | grep -P 'create mode \d+ this-month/\d{4}-\d{2}/index.html' | cut -d' ' -f5)
108+ echo "Detected a new monthly page:" $new_page
109+ curl -s -X POST \
110+ https://api.github.com/repos/rust-osdev/homepage/issues/212/comments \
111+ -d "{\"body\":\"New issue published: [**$new_page**](https://rust-osdev.com/$new_page). Beep boop.\"}" \
112+ -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}"
113+ fi
102114 working-directory : " gh-pages"
103115
104116 - name : " Show Changes"
You can’t perform that action at this time.
0 commit comments