You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-9Lines changed: 12 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,28 +4,27 @@
4
4
[](https://github.com/exuanbo/actions-deploy-gist/actions?query=workflow%3Atest)
This is a Github Action to deploy your file to Github Gist.
7
+
This is a Github Action to deploy file to Github Gist.
8
8
9
9
## Quick start
10
10
11
11
```yml
12
-
- uses: actions/checkout@v2
12
+
- uses: actions/checkout@v3
13
13
- name: Deploy
14
14
uses: exuanbo/actions-deploy-gist@v1
15
15
with:
16
16
token: ${{ secrets.TOKEN }}
17
-
gist_id: from_your_gist_url
18
-
gist_description: "foo bar"
19
-
gist_file_name: foo.bar
20
-
file_path: ./dist/foo.bar
17
+
gist_id: from_gist_url
18
+
file_path: build/book.pdf
19
+
file_type: binary
21
20
```
22
21
23
22
## Setup
24
23
25
24
### Prep work
26
25
27
26
1. Create a gist (public or secret) if you don't have one.
28
-
1. Generate a new [Personal access token](https://github.com/settings/tokens/). Only the `gist` scope is needed. Check [Scopes for OAuth Apps](https://docs.github.com/en/developers/apps/scopes-for-oauth-apps) for details.
27
+
1. Generate a new [Personal access token](https://github.com/settings/tokens/). Only the `gist` scope is needed.
29
28
30
29
### Project setup
31
30
@@ -44,15 +43,19 @@ Id portion from the gist url, e.g. `https://gist.github.com/exuanbo/`**`e885afa3
44
43
45
44
#### `gist_description` (optional)
46
45
47
-
Optional description of the gist.
46
+
Description of the gist.
48
47
49
48
#### `gist_file_name` (optional)
50
49
51
50
Name of the file to be added in the gist. If not provided, the original file name from `file_path` will be used.
52
51
53
52
#### `file_path`
54
53
55
-
Relative to the current repo's root directory, e.g. `./dist/foo.bar`.
54
+
Relative to the current repo's root directory, e.g. `dist/foo.bar`.
55
+
56
+
#### `file_type` (optional)
57
+
58
+
Default to `text`. It should be set to `binary` if the file is image, pdf, etc.
0 commit comments