From 584999e46110d562eec9d42cbe11ffca86056d59 Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Sat, 12 Oct 2024 15:52:19 +0200 Subject: [PATCH] Generate PDF file at PR stage --- .github/workflows/pdf-at-pr.yaml | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/pdf-at-pr.yaml diff --git a/.github/workflows/pdf-at-pr.yaml b/.github/workflows/pdf-at-pr.yaml new file mode 100644 index 00000000..b74cac6f --- /dev/null +++ b/.github/workflows/pdf-at-pr.yaml @@ -0,0 +1,38 @@ +# This workflow will install Python dependencies and generate PDF file at PR +name: Create offline documentation on PR + +on: + pull_request: + types: [opened, reopened, synchronize, labeled] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ 3.8 ] + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel + pip install -r requirements.txt + - name: Run mkdocs --clean + run: | + mkdocs build --clean + + - name: Upload pdf + uses: actions/upload-artifact@v4 + with: + name: artifact + path: site/pdf/document.pdf +