Update main.yml #53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Generate PDF | |
| on: | |
| push: | |
| branches: [ pdf ] | |
| # paths: | |
| # - 'doc/**' # Trigger when docs are updated | |
| jobs: | |
| convert_to_pdf: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install md-to-pdf | |
| run: npm install -g md-to-pdf | |
| - name: Merge Markdown files | |
| run: | | |
| find doc -type f -name "*.md" | sort | xargs -I {} sh -c 'cat "$1" >> README.md' _ {} | |
| - name: Upload PDF | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: documentation-pdfs | |
| path: README.md | |