Publish PDF #10
Workflow file for this run
This file contains 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: Publish PDF | |
on: | |
release: | |
types: ["published"] | |
jobs: | |
publish-pdf: | |
name: publish-pdf | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: Setup python 3.11 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: Setup Chrome/Chromium web browser | |
uses: browser-actions/setup-chrome@v1 | |
with: | |
chrome-version: latest | |
id: setup-chrome | |
- name: Building tutorial PDF file | |
run: | | |
jupyter-book build ./ --builder singlehtml | |
echo Installed chromium version: ${{ steps.setup-chrome.outputs.chrome-version }} | |
${{ steps.setup-chrome.outputs.chrome-path }} --headless --disable-gpu --print-to-pdf file:///$(pwd)/_build/singlehtml/intro.html | |
- name: Upload PDF to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
asset_name: Sylabs_Singularity101-${{ github.ref_name }}.pdf | |
#tag: "PDF" | |
tag: ${{ github.ref }} | |
overwrite: true | |
file: output.pdf |