mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-10-27 10:25:50 -04:00
add cron action to auto-fetch new mentions from webmention.io
[skip ci]
This commit is contained in:
26
.github/workflows/webmentions.yml
vendored
Normal file
26
.github/workflows/webmentions.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
name: Fetch Webmentions
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 */3 * * *' # run every three hours at top of hour
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
fetch:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
WEBMENTIONS_TOKEN: ${{ secrets.WEBMENTIONS_TOKEN }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
lfs: false
|
||||||
|
- name: Get webmentions data
|
||||||
|
run: |
|
||||||
|
wget -nv -O data/webmentions.json "https://webmention.io/api/mentions.json?domain=jarv.is&token=$WEBMENTIONS_TOKEN"
|
||||||
|
- name: Push changes
|
||||||
|
run: |
|
||||||
|
git config --global user.name "github-actions[bot]"
|
||||||
|
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
|
git commit -am "Add new webmentions 🎉" -m "[skip ci]" || echo "No new mentions... 😢"
|
||||||
|
git push origin main
|
||||||
0
data/webmentions.json
Normal file
0
data/webmentions.json
Normal file
Reference in New Issue
Block a user