-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(mastodon): rm mastodon api and renderer locally
- Loading branch information
Showing
12 changed files
with
1,282 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# .github/workflows/douban.yml | ||
name: Sync Douban Data | ||
|
||
on: | ||
schedule: | ||
- cron: "0 */12 * * *" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Fetch mastodon status | ||
|
||
on: | ||
# schedule: | ||
# - cron: "0 17 * * *" | ||
# watch: | ||
# types: [started] | ||
|
||
workflow_dispatch: | ||
repository_dispatch: | ||
types: | ||
# mastodon webhook | ||
- mastodon-update | ||
|
||
jobs: | ||
mastodon: | ||
name: Fetch mastodon status | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
# 下载最新的 Mastodon | ||
- name: Download Mastodon Status | ||
run: | | ||
cd data/mastodon/ | ||
rm data/mastodon/mastodon.json | ||
url="https://e5n.cc/api/v1/accounts/111136231674527355/statuses?limit=10&exclude_replies=true&exclude_reblogs=true" | ||
output="mastodon.json" | ||
curl -s "$url" >"$output" | ||
# 把修改后的数据提交到 GitHub 仓库 | ||
- name: Git Add and Commit | ||
if: ${{ env.REMOTE_COUNT != env.CURRENT_COUNT }} | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
message: 'chore(data): fetch mastodon status' | ||
add: | | ||
'./data/mastodon' | ||
# 调用另外的 GitHub Actions 构建 Hugo | ||
- name: Build Hugo and Deploy | ||
uses: peter-evans/repository-dispatch@v2 | ||
with: | ||
event-type: "Build Hugo and Deploy" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# .github/workflows/douban.yml | ||
name: Sync NeoDB Data | ||
|
||
on: | ||
schedule: | ||
- cron: "0 17 * * *" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.