Closed pkra closed 1 year ago
Basically, https://github.com/pkra/action-time/blob/master/.github/workflows/blank.yml but I need to recheck what I modified in the current server setup.
This is basically what is currently run:
echo "change directory" && \
cd ./mathblogging-base && \
echo "Generate feeds.json" && \
wget -O data.csv "https://docs.google.com/spreadsheets/d/e/2PACX-1vTohVihVKYUFb7REtchf6PcoMejdrgEj4oTAphUhSUeREOau9QU8n1wGKg9cWNSmxMhMP1D3WKeyiw9/pub?gid=1891944288&single=true&output=csv" && \
node ./tools/csv_to_json.js && \
echo "Clean Old Feeds" && \
find ./feeds -mtime +31 -type f -delete && \
echo "Download feeds" && \
sh ./tools/wgetter.sh && \
echo "Generate entries.json" && \
node ./lib/generateEntries.js && \
echo "Reset mathblogging.org" && \
git -C ./mathblogging.org fetch --depth 1 && \
git -C ./mathblogging.org reset --hard origin/gh-pages &&\
echo "Run app.js" && \
node ./lib/app.js && \
echo "Commit and Push Site" && \
git -C ./mathblogging.org -c user.email=xxx@yyy -c user.name='xxx' add -u && \
git -C ./mathblogging.org -c user.email=xxx@yyy -c user.name='xxx' commit -m"`date`" && \
git -C ./mathblogging.org -c user.email=xxx@yyy -c user.name='thepark' push origin gh-pages && \
echo "All done!"
So looking at current (untracked) changes in csv_to_json, we ran into the same problem with google sheets we had with settheorytalks and I added wget here while reworking csv_to_json to no read from file.
I'll push the csv_to_json changes.
d8ec958 provides a first attempt.
The script is unable to find the environment variables. I've temporarily disabled editors.js to get a clean run.
Since my last attempts at getting the secrets to the api failed, I'm wondering if we should just give up on this.
A super simple way would be to leave it to twitter and just embed mathblogging's timeline, see https://publish.twitter.com/
Long since been resolved, cf. https://github.com/mathblogging/mathblogging.org/commits/gh-pages/.github/workflows/main.yml
We want to move the regeneraton to github actions. A cron job every few hours should be sufficient.