Skip to content

Commit

Permalink
create pdf build action
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Li <[email protected]>
  • Loading branch information
nxpfrankli committed Jun 2, 2023
1 parent 4968c31 commit 3f63f0b
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
fetch-depth: 0

- name: Set up environment
run: sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install libusb-1.0-0-dev libbz2-dev libzstd-dev asciidoc rename
run: sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install libusb-1.0-0-dev libbz2-dev libzstd-dev

- name: Build
run: |
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/doc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build pdf document

on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize

jobs:
build:
name: Build for pdf
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
repository: nxp-imx/mfgtools.wiki.git
path: wiki
ref: master

- name: Set up environment
run: sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install asciidoc rename

- name: Build
run: |
cd wiki
rename -f 's/\.asciidoc$//' *
echo "<revhistory>" > UUU-docinfo.xml
git log -n25 --reverse --format="format:<revision><revnumber>%h</revnumber><date>%cd</date><authorinitials>%an</authorinitials><revremark>%s</revremark></revision>" >> UUU-docinfo.xml
echo "</revhistory>" >> UUU-docinfo.xml
a2x -L -a docinfo UUU
- name: Upload Build Artifacts
uses: actions/upload-artifact@v2
with:
name: UUU.pdf
path: wiki/UUU.pdf

- name: Create or Update Release
uses: ncipollo/release-action@v1
with:
name: Release UUU_1.5.${{ github.sha }}_TEST
tag: UUU_1.5.${{ github.sha }}_TEST
commit: ${{ github.hash }}
allowUpdates: true
draft: true
prerelease: true
artifacts: "wiki/UUU.pdf"

0 comments on commit 3f63f0b

Please sign in to comment.