-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add more detailed guide for users
- Loading branch information
Showing
1 changed file
with
32 additions
and
9 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 |
---|---|---|
|
@@ -9,15 +9,38 @@ | |
## 使用 | ||
|
||
1. 新增一個 GitHub Actions 作業流程。 | ||
|
||
2. 添加 [`schedule`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule) 欄位,並設定定時執行。 | ||
|
||
3. 在 Marketplace 中選擇 [此 Action](https://github.com/marketplace/actions/quote-box-zh_tw)。 | ||
|
||
4. 使用 [Deploy to Gist](https://github.com/marketplace/actions/deploy-to-gist) 並填入必要參數(`token`、`gist_id` 和 `file_path: quote.txt`)。 | ||
|
||
5. 成功! | ||
你可以使用 GitHub Actions 作業流程來執行操作,以下為一個範例,使用 [Deploy to Gist](https://github.com/marketplace/actions/deploy-to-gist): | ||
|
||
```yaml | ||
name: Push to Gist | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: 0 0 * * * # 每天執行 | ||
|
||
jobs: | ||
push: | ||
runs-on: ubuntu-22.04 | ||
env: | ||
FILE_NAME: 🌧 Quote | ||
GIST_ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | ||
steps: | ||
- name: Download | ||
uses: rnmeow/[email protected] | ||
- name: Push | ||
uses: exuanbo/[email protected] | ||
with: | ||
token: ${{ secrets.GH_TOKEN }} # 需要自行產生 | ||
gist_id: ${{ env.GIST_ID }} # 上述 `env` 設定 | ||
gist_file_name: ${{ env.FILE_NAME }} # 上述 `env` 設定 | ||
file_path: quote.txt | ||
file_type: text | ||
|
||
# Authored by Yu-huan Kuo, licensed under MIT License. | ||
``` | ||
|
||
## 授權 | ||
|
||
|