File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -16,11 +16,15 @@ jobs:
16
16
env :
17
17
GIST_TOKEN : ${{ secrets.GIST_TOKEN }}
18
18
run : |
19
- FILE_CONTENT=$(cat notes/questions.md | jq -Rs .)
20
- GIST_ID=076468498c7f080b3a6d0c1f8c618b19
21
-
22
- curl -X PATCH \
19
+ set -e
20
+ FILE_PATH="notes/questions.md"
21
+ GIST_ID="076468498c7f080b3a6d0c1f8c618b19"
22
+ GIST_FILENAME="00_ivs_questions.md" # Must match actual filename on Gist
23
+
24
+ FILE_CONTENT=$(cat "$FILE_PATH" | jq -Rs .)
25
+
26
+ curl -i -X PATCH \
23
27
-H "Authorization: token $GIST_TOKEN" \
24
28
-H "Accept: application/vnd.github+json" \
25
- -d "{\"files\": {\"questions.md \": {\"content\": $FILE_CONTENT}}}" \
26
- https://api.github.com/gists/$GIST_ID
29
+ -d "{\"files\": {\"$GIST_FILENAME \": {\"content\": $FILE_CONTENT}}}" \
30
+ " https://api.github.com/gists/$GIST_ID"
You can’t perform that action at this time.
0 commit comments