File tree Expand file tree Collapse file tree 5 files changed +66
-1
lines changed
Expand file tree Collapse file tree 5 files changed +66
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Check code style and quality
2+
3+ on :
4+ push :
5+ branches : [master]
6+ pull_request :
7+ branches : [master]
8+ workflow_dispatch :
9+
10+ jobs :
11+ check :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v3
15+ - uses : pnpm/action-setup@v2
16+ with :
17+ version : 8
18+ - name : Use Node.js 16
19+ uses : actions/setup-node@v3
20+ with :
21+ node-version : 16
22+ cache : " pnpm"
23+ - name : install
24+ run : pnpm install
25+ - name : ESLint
26+ run : pnpm run lint
27+ - name : Prettier
28+ run : pnpm run prettier:check
29+ - name : Typescript
30+ run : pnpm run types
Original file line number Diff line number Diff line change 1+ name : Deploy to GitHub Pages
2+
3+ on :
4+ push :
5+ branches : [master]
6+ workflow_dispatch :
7+
8+ permissions :
9+ contents : read
10+ pages : write
11+ id-token : write
12+
13+ jobs :
14+ build :
15+ runs-on : ubuntu-latest
16+ steps :
17+ - name : Checkout your repository using git
18+ uses : actions/checkout@v3
19+ - name : Install, build, and upload your site
20+ uses : withastro/action@v0
21+ with :
22+ node-version : 16
23+
24+ deploy :
25+ needs : build
26+ runs-on : ubuntu-latest
27+ environment :
28+ name : github-pages
29+ url : ${{ steps.deployment.outputs.page_url }}
30+ steps :
31+ - name : Deploy to GitHub Pages
32+ id : deployment
33+ uses : actions/deploy-pages@v1
Original file line number Diff line number Diff line change 1+ pnpm-lock.yaml
Original file line number Diff line number Diff line change 88 "preview" : " astro preview" ,
99 "types" : " astro check && tsc --noEmit" ,
1010 "prettier" : " prettier --write . --plugin=prettier-plugin-astro" ,
11+ "prettier:check" : " prettier --check . --plugin=prettier-plugin-astro" ,
1112 "lint" : " eslint --ext .js,.astro src"
1213 },
1314 "dependencies" : {
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ const { body } = post;
1111const cleaned = body
1212 .replace (/ \| . * \| / gm , " " ) // remove tables
1313 .replace (/ [#*] + . * $ / gm , " " ) // remove markdown headings
14- .replace (/ \[ ([^ \] ] + )\]\( [^ \ ) ] + \) / gm , " $1" ) // replace markdown links with link text
14+ .replace (/ \[ ([^ \] ] + )\]\( [^ )] + \) / gm , " $1" ) // replace markdown links with link text
1515 .replace (/ <[^ >] * >? / gm , " " ); // remove html tags
1616
1717const excerpt = cleaned .split (/ \s / ).slice (0 , 60 ).join (" " ) + " ..." ;
You can’t perform that action at this time.
0 commit comments