Skip to content

Commit b4914de

Browse files
committed
edk2-TemplateSpecification: Use publish-gitbook-docs action
Update edk2-TemplateSpecification to use the publish-gitbook-docs action that verifies the Signed-off-by and Contributed-under tags in the commit message and if that passes, also generates the HTML, PDF, and ePub versions of the documents in either the pr-pages branch when processing a pull request or the gh-pages branch when processing a push. Also a CODEOWNERS files with the current TianoCore stewards as the default CODEOWNERS. Document specific CODEOWNERS can be added later as required. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <[email protected]>
1 parent 19770ee commit b4914de

File tree

2 files changed

+16
-27
lines changed

2 files changed

+16
-27
lines changed

.github/workflows/gitbook-action.yml

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,24 @@
11
name: 'Gitbook Action Build'
22
on:
3+
pull_request_target:
4+
types:
5+
- opened
6+
- edited
7+
- reopened
8+
- synchronize
39
push:
410
branches:
511
- master
12+
- main
613
- release/*
714
workflow_dispatch:
815

916
jobs:
10-
build:
17+
publish-gitbook-docs:
18+
name: Publish GitBook Docs
1119
runs-on: ubuntu-latest
1220
steps:
13-
- name: Checkout action
14-
uses: actions/checkout@v2
15-
- name: Get Branch
16-
run: |
17-
branch=${{ github.ref_name }}
18-
pubdir=${branch/master/draft}
19-
pubdir=${pubdir////-}
20-
echo "ON_PUSH_BRANCH_NAME=$branch" >> $GITHUB_ENV
21-
echo "ON_PUSH_PUBDIR=$pubdir" >> $GITHUB_ENV
22-
- name: Gitbook Action
23-
uses: zanderzhao/[email protected]
24-
with:
25-
token: ${{secrets.GITBOOK_ACTION_PERSONAL_TOKEN}}
26-
source_branch: ${{env.ON_PUSH_BRANCH_NAME}}
27-
publish_branch: gh-pages
28-
publish_dir: ${{env.ON_PUSH_PUBDIR}}
29-
publish_remove_last_build: true
30-
gitbook_pdf: true
31-
gitbook_pdf_dir: /
32-
gitbook_pdf_name: ${{ github.event.repository.name }}-${{env.ON_PUSH_PUBDIR}}
33-
gitbook_epub: true
34-
gitbook_epub_dir: /
35-
gitbook_epub_name: ${{ github.event.repository.name }}-${{env.ON_PUSH_PUBDIR}}
36-
gitbook_mobi: true
37-
gitbook_mobi_dir: /
38-
gitbook_mobi_name: ${{ github.event.repository.name }}-${{env.ON_PUSH_PUBDIR}}
21+
- name: Publish GitBook Docs
22+
uses: tianocore-docs/publish-gitbook-docs@main
23+
with:
24+
token: ${{secrets.GITBOOK_ACTION_PERSONAL_TOKEN}}

CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# tianocore-docs CODEOWNERS
2+
3+
* @leiflindholm @mdkinney @ajfish @ardbiesheuvel @makubacki

0 commit comments

Comments
 (0)