Skip to content

Commit 0a20ac0

Browse files
committed
docs(readme): add instruction
1 parent 4cf366c commit 0a20ac0

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

README.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,41 @@
11
# Deploy to Gist
22

3-
[![test](https://github.com/exuanbo/actions-deploy-gist/workflows/test/badge.svg?branch=main&event=push)](https://github.com/exuanbo/actions-deploy-gist/actions?query=workflow%3Atest)
3+
[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/exuanbo/actions-deploy-gist/test/main?event=push&label=test&logo=github&style=flat-square)](https://github.com/exuanbo/actions-deploy-gist/actions?query=workflow%3Atest)
44

5-
## Getting started
5+
## Quick start
66

77
```yml
8+
- uses: actions/checkout@v2
89
- name: Deploy
910
uses: exuanbo/actions-deploy-gist@v1
1011
with:
1112
token: ${{ secrets.TOKEN }}
12-
gist_id: if_you_don't_have_then_create_one
13+
gist_id: from_your_gist_url
1314
gist_file_name: foo.bar
1415
file_path: ./dist/foo.bar
1516
```
1617
18+
## Setup
19+
20+
### Prep work
21+
22+
1. Create a public gist if you don't have one.
23+
1. Generate a new [Personal access token](https://github.com/settings/tokens/). Only the `gist` scope is needed.
24+
25+
Check [Scopes for OAuth Apps](https://docs.github.com/en/developers/apps/scopes-for-oauth-apps) for details.
26+
27+
### Project setup
28+
29+
1. Edit your repo `.github/workflows/foo.yml`.
30+
1. Go to your repo **Settings > Secrets**. Add the token generated above as `TOKEN`.
31+
32+
### Options
33+
34+
- `token`: `${{ secrets.TOKEN }}`
35+
- `gist_id`: The id portion from your gist url, e.g. `https://gist.github.com/exuanbo/`**`e885afa349a0e5d1cfb408e46d6a37bc`**.
36+
- `gist_file_name`: Name of the file to be added in your gist. If not provided, the original file name from `file_path` will be used.
37+
- `file_path`: E.g. `./dist/foo.bar`.
38+
1739
## License
1840

1941
[MIT](https://github.com/exuanbo/actions-deploy-gist/blob/master/LICENSE)

0 commit comments

Comments
 (0)