Merge pull request #78 from ceos-org/add-ceos-eo-glossary-reference #16
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: Build PDF on Release | |
| on: | |
| release: | |
| types: [published] | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build-pdf: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y pandoc texlive-xetex texlive-fonts-recommended texlive-latex-extra | |
| - name: Install fonts | |
| run: | | |
| wget http://tug.org/fonts/getnonfreefonts/install-getnonfreefonts | |
| sudo texlua install-getnonfreefonts | |
| sudo getnonfreefonts --sys -a | |
| - name: Install Python dependencies | |
| run: | | |
| pip install pypandoc click | |
| - name: Build PDF | |
| run: | | |
| python publishing/generate_pdf.py \ | |
| --output publishing/interoperability-handbook.pdf \ | |
| --version ${{ github.event.release.tag_name || github.sha }} | |
| - name: Upload PDF artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: interoperability-handbook-pdf | |
| path: publishing/interoperability-handbook.pdf | |
| - name: Create Release Asset | |
| if: github.event_name == 'release' | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ github.event.release.upload_url }} | |
| asset_name: interoperability-handbook.pdf | |
| asset_path: publishing/interoperability-handbook.pdf | |
| asset_content_type: application/pdf |