File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy to GitHub Pages
2+
3+ on :
4+ push :
5+ branches : [main]
6+ workflow_dispatch :
7+
8+ permissions :
9+ contents : read
10+ pages : write
11+ id-token : write
12+
13+ # Allow one deploy at a time; do not cancel an in-flight run so a publish
14+ # that has already reached GitHub Pages can finish cleanly.
15+ concurrency :
16+ group : pages
17+ cancel-in-progress : false
18+
19+ jobs :
20+ build :
21+ runs-on : ubuntu-latest
22+ steps :
23+ - name : Checkout
24+ uses : actions/checkout@v4
25+
26+ - name : Setup Node
27+ uses : actions/setup-node@v4
28+ with :
29+ node-version : ' 20'
30+ cache : npm
31+
32+ - name : Install dependencies
33+ run : npm ci
34+
35+ # Call docusaurus directly rather than `npm run build`: the `prebuild`
36+ # hook tries to regenerate src/generated/dockerBaseConfigs.ts from a
37+ # sibling ../grobid-home/ checkout that only exists in local dev
38+ # environments. The generated TS files are committed to git, so the
39+ # build has everything it needs without the hook.
40+ - name : Build site
41+ run : npx docusaurus build
42+
43+ - name : Upload Pages artifact
44+ uses : actions/upload-pages-artifact@v3
45+ with :
46+ path : build
47+
48+ deploy :
49+ needs : build
50+ runs-on : ubuntu-latest
51+ environment :
52+ name : github-pages
53+ url : ${{ steps.deployment.outputs.page_url }}
54+ steps :
55+ - name : Deploy to GitHub Pages
56+ id : deployment
57+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ import {themes as prismThemes} from 'prism-react-renderer';
22import type { Config } from '@docusaurus/types' ;
33import type * as Preset from '@docusaurus/preset-classic' ;
44
5- const githubOwner = process . env . DOCS_GITHUB_OWNER ?? 'kermitt2 ' ;
6- const githubRepo = process . env . DOCS_GITHUB_REPO ?? 'grobid' ;
7- const docsBranch = process . env . DOCS_BRANCH ?? 'docs_V2_docusaurus ' ;
8- const siteUrl = process . env . DOCS_SITE_URL ?? `https://${ githubOwner } .github.io` ;
5+ const githubOwner = process . env . DOCS_GITHUB_OWNER ?? 'grobidOrg ' ;
6+ const githubRepo = process . env . DOCS_GITHUB_REPO ?? 'grobid-tutorial ' ;
7+ const docsBranch = process . env . DOCS_BRANCH ?? 'main ' ;
8+ const siteUrl = process . env . DOCS_SITE_URL ?? `https://${ githubOwner . toLowerCase ( ) } .github.io` ;
99const siteBaseUrl = process . env . DOCS_BASE_URL ?? `/${ githubRepo } /` ;
1010const githubRepoUrl = `https://github.com/${ githubOwner } /${ githubRepo } ` ;
11- const editBaseUrl = `${ githubRepoUrl } /tree/${ docsBranch } /website/ ` ;
11+ const editBaseUrl = `${ githubRepoUrl } /tree/${ docsBranch } /` ;
1212const discussionRepo = `${ githubOwner } /${ githubRepo } ` ;
1313const tlumaSource = process . env . DOCS_TLUMA_SOURCE ?? discussionRepo ;
1414const giscusRepo = process . env . DOCS_GISCUS_REPO ?? discussionRepo ;
You can’t perform that action at this time.
0 commit comments