File tree Expand file tree Collapse file tree 3 files changed +36
-8
lines changed
Expand file tree Collapse file tree 3 files changed +36
-8
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ pull_request :
5+ types : [opened, synchronize]
6+ push :
7+ branches : [main]
8+
9+ concurrency :
10+ group : " ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}"
11+ cancel-in-progress : true
12+
13+ jobs :
14+ release :
15+ runs-on : ubuntu-latest
16+ if : " ${{ github.repository_owner == 'marko-js' && github.event_name == 'push' }}"
17+ steps :
18+ - name : Checkout code
19+ uses : actions/checkout@v4
20+ - name : Setup node
21+ uses : actions/setup-node@v4
22+ with :
23+ node-version : 22
24+ cache : npm
25+ - name : Install dependencies
26+ run : npm ci
27+ - name : Deploy
28+ run : npm run deploy
29+ env :
30+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
31+ REPO_GITHUB_API_TOKEN : ${{ secrets.REPO_GITHUB_API_TOKEN }}
Original file line number Diff line number Diff line change @@ -21,9 +21,9 @@ article#${styles.article}
2121 img src = contributor .photo alt = " "
2222 -- ${contributor .username }
2323 li
24- a href = ` https://github.com/marko-js/website/blob/master/src/routes /docs/${$global .url .pathname .substring (
24+ a href = ` https://github.com/marko-js/website-next /blob/main /docs/${$global .url .pathname .substring (
2525 " /docs/" .length ,
26- $global .url .pathname .length - 1 ,
26+ $global .url .pathname .length ,
2727 )}.md `
2828 div
2929 fa-icon = faPlus
Original file line number Diff line number Diff line change @@ -11,17 +11,14 @@ interface GithubProfile {
1111}
1212
1313export default ( ( ctx ) => {
14- const route = ctx . url . pathname . substring (
15- ctx . url . pathname . indexOf ( "docs/" ) ,
16- ctx . url . pathname . length - 1 ,
17- ) ;
14+ const route = ctx . url . pathname . substring ( ctx . url . pathname . indexOf ( "docs/" ) ) ;
1815 const contributors : Record < string , GithubProfile > = { } ;
1916 ctx . contributors = fetch (
20- `https://api.github.com/repos/marko-js/website/commits?path=${ route } .md` ,
17+ `https://api.github.com/repos/marko-js/website-next /commits?path=${ route } .md` ,
2118 {
2219 method : "GET" ,
2320 headers : {
24- Authorization : `Bearer ${ process . env . GITHUB_TOKEN } ` ,
21+ Authorization : `Bearer ${ process . env . REPO_GITHUB_API_TOKEN } ` ,
2522 Accept : "application/vnd.github.v3+json" ,
2623 } ,
2724 } ,
You can’t perform that action at this time.
0 commit comments