File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Docusaurus Build Check
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ build :
11+ name : Build Docusaurus Site
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - uses : actions/checkout@v3
16+
17+ - name : Setup Node.js
18+ uses : actions/setup-node@v3
19+ with :
20+ node-version : ' 18'
21+ cache : ' npm'
22+
23+ - name : Install dependencies
24+ run : npm ci
25+
26+ - name : Build site
27+ run : npm run build
28+
29+ - name : Update PR Status
30+ if : github.event_name == 'pull_request'
31+ uses : actions/github-script@v6
32+ with :
33+ script : |
34+ const { owner, repo, number } = context.issue;
35+ const { sha } = context.payload.pull_request.head;
36+
37+ await github.rest.checks.create({
38+ owner,
39+ repo,
40+ name: 'Docusaurus Build',
41+ head_sha: sha,
42+ status: 'completed',
43+ conclusion: 'success',
44+ output: {
45+ title: 'Build Successful',
46+ summary: 'The Docusaurus site built successfully'
47+ }
48+ });
You can’t perform that action at this time.
0 commit comments