From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.groups.io with SMTP id smtpd.web12.2762.1605306312344008793 for ; Fri, 13 Nov 2020 14:25:12 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TCNw/2b9; spf=pass (domain: redhat.com, ip: 63.128.21.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605306311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Rd7eOyW0Xa4LzVzsjQYyPVT5A2WCoSWm/xzD87ULmws=; b=TCNw/2b9hyjcDqVgrk47/nD+BNZRg1ve3xEL4kJmNWwpSEgrzGP8IlHY1VRYQS+orhbndd 1jyUFdmO1ekUucP0EIOFEVZwXFf8PCKGrpNOz2ris8m9FDfV6DZsAGHR5nQ/2jYMjRKxoX KpJoc92MaTnKcbs8Nveh/hD/c7bvJh4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-352-YE3Nmt9sOq2VH1aB7B91XQ-1; Fri, 13 Nov 2020 17:25:09 -0500 X-MC-Unique: YE3Nmt9sOq2VH1aB7B91XQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C8F1910B9CBB; Fri, 13 Nov 2020 22:25:08 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-112-113.ams2.redhat.com [10.36.112.113]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0735F60C84; Fri, 13 Nov 2020 22:25:07 +0000 (UTC) Subject: Re: [edk2-devel] [UEFI_Driver_HII_Linux_Lab_Guide/master][Patch v2] Add Gitbook Action to publish HTML, PDF, EPUB, and MOBI To: devel@edk2.groups.io, michael.d.kinney@intel.com References: <20201113052057.1508-1-michael.d.kinney@intel.com> From: "Laszlo Ersek" Message-ID: <039f6bc7-b545-6001-4aa3-05ec6aa02619@redhat.com> Date: Fri, 13 Nov 2020 23:25:07 +0100 MIME-Version: 1.0 In-Reply-To: <20201113052057.1508-1-michael.d.kinney@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 11/13/20 06:20, Michael D Kinney wrote: > Add Gitbook Action to publish this document in the > gh-pages branch of the same repository in HTML, PDF, > EPUB, and MOBI formats. The draft and release > versions of the documents are published in different > directories of the gh-pages branch so all published > versions are available for download and online > viewing. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Michael D Kinney > --- > .bookignore | 3 +++ > .github/workflows/gitbook-action.yml | 39 ++++++++++++++++++++++++++++ > .gitignore | 16 ++++++++++++ > book.json | 19 +++++++------- > styles/epub.css | 8 ++++++ > styles/mobi.css | 8 ++++++ > styles/pdf.css | 8 ++++++ > styles/website.css | 8 ++++++ > 8 files changed, 99 insertions(+), 10 deletions(-) > create mode 100644 .bookignore > create mode 100644 .github/workflows/gitbook-action.yml > create mode 100644 .gitignore > > diff --git a/.bookignore b/.bookignore > new file mode 100644 > index 0000000..ed716f0 > --- /dev/null > +++ b/.bookignore > @@ -0,0 +1,3 @@ > +/.github > +.gitignore > +.bookignore > diff --git a/.github/workflows/gitbook-action.yml b/.github/workflows/gitbook-action.yml > new file mode 100644 > index 0000000..917b0d7 > --- /dev/null > +++ b/.github/workflows/gitbook-action.yml > @@ -0,0 +1,39 @@ > +name: 'Gitbook Action Build' > +on: > + push: > + branches: > + - master > + - release/* > + workflow_dispatch: > + > +jobs: > + build: > + runs-on: ubuntu-latest > + steps: > + - name: Checkout action > + uses: actions/checkout@v2 > + - name: Get Branch > + run: | > + raw=$(git branch -r --contains ${{ github.ref }}) > + branch=${raw/ origin\/} > + pubdir=${branch/master/draft} > + pubdir=${pubdir////-} > + echo "ON_PUSH_BRANCH_NAME=$branch" >> $GITHUB_ENV > + echo "ON_PUSH_PUBDIR=$pubdir" >> $GITHUB_ENV > + - name: Gitbook Action > + uses: zanderzhao/gitbook-action@v1.2.4 > + with: > + token: ${{secrets.GITBOOK_ACTION_PERSONAL_TOKEN}} > + source_branch: ${{env.ON_PUSH_BRANCH_NAME}} > + publish_branch: gh-pages > + publish_dir: ${{env.ON_PUSH_PUBDIR}} > + publish_remove_last_build: true > + gitbook_pdf: true > + gitbook_pdf_dir: / > + gitbook_pdf_name: ${{ github.event.repository.name }}-${{env.ON_PUSH_PUBDIR}} > + gitbook_epub: true > + gitbook_epub_dir: / > + gitbook_epub_name: ${{ github.event.repository.name }}-${{env.ON_PUSH_PUBDIR}} > + gitbook_mobi: true > + gitbook_mobi_dir: / > + gitbook_mobi_name: ${{ github.event.repository.name }}-${{env.ON_PUSH_PUBDIR}} > diff --git a/.gitignore b/.gitignore > new file mode 100644 > index 0000000..e68dc83 > --- /dev/null > +++ b/.gitignore > @@ -0,0 +1,16 @@ > +# Node rules: > +## Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) > +.grunt > + > +## Dependency directory > +## Commenting this out is preferred by some people, see > +## https://docs.npmjs.com/misc/faq#should-i-check-my-node_modules-folder-into-git > +/node_modules > + > +# Book build output > +/_book > + > +# eBook build output > +/book.epub > +/book.mobi > +/book.pdf > diff --git a/book.json b/book.json > index 50194a9..e782c4a 100644 > --- a/book.json > +++ b/book.json > @@ -1,10 +1,9 @@ > -{ > - "variables" : { > - "draft" : "yes", > - "title" : "UEFI Driver HII Linux Lab Guide", > - "version" : "Revision 01.0" > - }, > - > - "plugins": ["puml"], > - "pluginsConfig": {} > -} > \ No newline at end of file > +{ > + "variables" : { > + "draft" : "yes", > + "title" : "UEFI Driver HII Linux Lab Guide", > + "version" : "Revision 01.0" > + }, > + "plugins": ["puml-aleung"], > + "pluginsConfig": {} > +} > diff --git a/styles/epub.css b/styles/epub.css > index be6b609..87d4f8f 100644 > --- a/styles/epub.css > +++ b/styles/epub.css > @@ -1,3 +1,11 @@ > +p { > + font-family: sans, sans-serif, Ariel; > +} > + > +body { > + font-family: sans, sans-serif, Ariel; > +} > + > h1 { > color: #0860A8; > font-weight: normal; > diff --git a/styles/mobi.css b/styles/mobi.css > index db1ca60..0d85d04 100644 > --- a/styles/mobi.css > +++ b/styles/mobi.css > @@ -1,3 +1,11 @@ > +p { > + font-family: sans, sans-serif, Ariel; > +} > + > +body { > + font-family: sans, sans-serif, Ariel; > +} > + > h1 { > color: #0860A8; > font-weight: bold; > diff --git a/styles/pdf.css b/styles/pdf.css > index be6b609..87d4f8f 100644 > --- a/styles/pdf.css > +++ b/styles/pdf.css > @@ -1,3 +1,11 @@ > +p { > + font-family: sans, sans-serif, Ariel; > +} > + > +body { > + font-family: sans, sans-serif, Ariel; > +} > + > h1 { > color: #0860A8; > font-weight: normal; > diff --git a/styles/website.css b/styles/website.css > index cc1f1e5..1a20751 100644 > --- a/styles/website.css > +++ b/styles/website.css > @@ -1,3 +1,11 @@ > +p { > + font-family: sans, sans-serif, Ariel; > +} > + > +body { > + font-family: sans, sans-serif, Ariel; > +} > + > h1 { > color: #0860A8; > font-weight: normal; > Per previous discussion: [edk2-devel] Tianocore-docs Gitbook offline document status (PDF, EPUB, MOBI) https://edk2.groups.io/g/devel/message/66308 https://www.redhat.com/archives/edk2-devel-archive/2020-October/msg00526.html Acked-by: Laszlo Ersek