33从句子json中随机抽取语录,格式化后保存至 ` quote.txt ` 。你可以利用 GitHub Actions 來定时推送到 [ Gist] ( https://gist.github.com ) 并在个人资料中置顶,以增添其丰富程度。
44
55
6- > * PS. 若想了解更多「置頂 Gist」專案,請參見 *
6+ > * PS. 若想了解更多「置顶 Gist」项目,可以看看: *
77> * < https://github.com/matchai/awesome-pinned-gists > *
88
99## 使用
1818]
1919```
2020
21- 你可以使用 GitHub Actions 以将其推送到一个Gist,以下為一個範例,使用 [ Deploy to Gist] ( https://github.com/marketplace/actions/deploy-to-gist ) :
21+ 你可以使用 GitHub Actions 以将其推送到一个Gist,以下是一个使用 [ Deploy to Gist] ( https://github.com/marketplace/actions/deploy-to-gist ) 的例子 :
2222
2323``` yaml
2424name : Push to Gist
2828 branches :
2929 - master
3030 schedule :
31- - cron : 0 0 * * * # 每天執行
31+ - cron : 0 0 * * * # 每天0点(UTC)执行
3232
3333jobs :
3434 push :
@@ -38,15 +38,15 @@ jobs:
3838 GIST_ID : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
3939 steps :
4040 - name : Download
41- uses : BlockG-ws/quote-box-gist@master # 尚未發布到 Marketplace
41+ uses : BlockG-ws/quote-box-gist@0.2.0
4242 with :
43- quotes : ./quotes.json # 可選
43+ quotes : ./quotes.json # 可选,默认为仓库根目录的 quotes.json
4444 - name : Push
45454646 with :
47- token : ${{ secrets.GH_TOKEN }} # 需要自行產生
48- gist_id : ${{ env.GIST_ID }} # 上述 `env` 設定
49- gist_file_name : ${{ env.FILE_NAME }} # 上述 `env` 設定
47+ token : ${{ secrets.GH_TOKEN }} # 需要自行生成
48+ gist_id : ${{ env.GIST_ID }} # 上述 `env` 中的设定
49+ gist_file_name : ${{ env.FILE_NAME }} # 上述 `env` 中的设定
5050 file_path : quote.txt
5151 file_type : text
5252
5959Copyright (C) 2023, 2024 [ Yu-huan Kuo] ( https://github.com/rnmeow ) , licensed under [ MIT License] ( https://github.com/rnmeow/quote-box-zh_tw/blob/master/LICENSE.txt ) .
6060
6161此Fork:
62- Licensed under MIT License.
62+ Licensed under MIT License.
0 commit comments