File tree Expand file tree Collapse file tree 3 files changed +19
-16
lines changed
Expand file tree Collapse file tree 3 files changed +19
-16
lines changed Original file line number Diff line number Diff line change 2828 run : " pnpm install"
2929 - name : " build"
3030 run : " pnpm build"
31+ env :
32+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3133 - name : " copy cloudflare configuration files to build directory"
3234 run : |
3335 cp _headers dist/
Original file line number Diff line number Diff line change 3030 run : " pnpm install"
3131 - name : " build"
3232 run : " pnpm build"
33+ env :
34+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3335 - name : " copy cloudflare configuration files to build directory"
3436 run : |
3537 cp _headers dist/
Original file line number Diff line number Diff line change @@ -10,23 +10,22 @@ export interface CommitInfo {
1010 committer : CommitterInfo ;
1111}
1212
13- const token : string | null = import . meta . env . GITHUB_TOKEN ;
13+ const token = process . env . GITHUB_TOKEN ;
1414
15- const options : RequestInit =
16- token != null
17- ? {
18- headers : {
19- Accept : "application/vnd.github+json" ,
20- "User-Agent" : "papermc-docs/author" ,
21- Authorization : `Bearer ${ token } ` ,
22- } ,
23- }
24- : {
25- headers : {
26- Accept : "application/vnd.github+json" ,
27- "User-Agent" : "papermc-docs/author" ,
28- } ,
29- } ;
15+ const options : RequestInit = token
16+ ? {
17+ headers : {
18+ Accept : "application/vnd.github+json" ,
19+ "User-Agent" : "papermc-docs/author" ,
20+ Authorization : `Bearer ${ token } ` ,
21+ } ,
22+ }
23+ : {
24+ headers : {
25+ Accept : "application/vnd.github+json" ,
26+ "User-Agent" : "papermc-docs/author" ,
27+ } ,
28+ } ;
3029
3130export const REPO = "PaperMC/docs" ;
3231const cache = new Map < string , CommitterInfo > ( ) ;
You can’t perform that action at this time.
0 commit comments