Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertK66 authored Nov 28, 2023
1 parent 10cffe7 commit 75d1152
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,35 @@ on:
workflow_dispatch:

jobs:
buildDoc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Replace MD tokens
run: |
ESCAPED_REPLACE=$(printf '%s\n' "${{ github.ref }}" | sed -e 's/[\/&]/\\&/g')
find doc/*.md -type f -exec sed -i "s/@TKN_COMMIT_ID@/$ESCAPED_REPLACE/g" {} \;
find doc/*.md -type f -exec sed -i "s/@TKN_VERSION@/${{ github.sha }}/g" {} \;
- name: Show replacement resut
run: cat doc/back.md

- name: Publish PDF Document
uses: RobertK66/actions-document-publish@79b8e666c0f531c297a98eee730d3fdecccde9f3
id: publish-document
with:
sources: 'doc/front.md doc/m*.md doc/back.md'
images_dir: doc/pic
image_import: pic
- name: Upload Document
uses: actions/upload-artifact@v3
id: upload-axf
with:
name: 'Build-${{ env.MY_SWVERSION }}'
path: ${{ steps.publish-document.outputs.pdf }}
if-no-files-found: error

buildJob:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -61,7 +90,7 @@ jobs:
releaseJob:
if: github.event_name == 'release' && github.event.action == 'created'
runs-on: ubuntu-latest
needs: buildJob
needs: [ buildJob, buildDoc ]
steps:
- name: Generate release defines
run: |
Expand Down

0 comments on commit 75d1152

Please sign in to comment.