Add CI for PDF generation#90
Conversation
* Closes 0xAX#21
|
@rcalixte thank you very much! I will take a look tomorrow morning |
|
@rcalixte I tested it and it looks really great! Thank you a lot. I have just two little suggestions that I'll describe in the next comments. |
| with: | ||
| entrypoint: './pandoc-docker.sh' | ||
|
|
||
| - id: short_sha |
There was a problem hiding this comment.
I would not generate it at each possible commit/PR. I think the best way will be to build PDF by tags (I will push one right after we will merge the PR) but also leave sha-based builds but only for manual builds (based on workflow_dispatch).
Something like this (I did not test it although by myself yet):
---
name: Generate PDF using Pandoc
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
create_pdf:
runs-on: ubuntu-latest
permissions:
contents: write
container:
image: pandoc/latex:3
steps:
- uses: actions/checkout@v7
- uses: docker://pandoc/latex:3
timeout-minutes: 10
with:
entrypoint: './pandoc-docker.sh'
- id: release_meta
shell: bash
run: |
short_sha="${GITHUB_SHA::7}"
if [[ "$GITHUB_EVENT_NAME" == "workflow_dispatch" ]]; then
echo "tag_name=dev-${short_sha}" >> "$GITHUB_OUTPUT"
echo "prerelease=true" >> "$GITHUB_OUTPUT"
echo "make_latest=false" >> "$GITHUB_OUTPUT"
else
echo "tag_name=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT"
echo "prerelease=false" >> "$GITHUB_OUTPUT"
echo "make_latest=true" >> "$GITHUB_OUTPUT"
fi
- uses: softprops/action-gh-release@v3
with:
tag_name: ${{ steps.release_meta.outputs.tag_name }}
target_commitish: ${{ github.sha }}
draft: false
prerelease: ${{ steps.release_meta.outputs.prerelease }}
make_latest: ${{ steps.release_meta.outputs.make_latest }}
fail_on_unmatched_files: true
files: |
*.pdf@rcalixte what do you think?
There was a problem hiding this comment.
I see what you mean and I can work to implement this.
There was a problem hiding this comment.
Can we move this and all related scripts below, pandoc configuration and so on to ./scripts/pdf directory or something like this?
There was a problem hiding this comment.
We should be able to move things around. I'll include this in the update as well.
Description
Add CI to automatically generate PDFs on pushes to master with a manual trigger for creation as well.
A CI job sample run is here the forked repository contains a release asset with the PDF as well.
Changes proposed in this pull request:
Content modifications are to support PDF generation:
Related issues