mirror of
https://github.com/Steffo99/sophon.git
synced 2024-12-21 22:34:21 +00:00
🔨 Create report build workflow
This commit is contained in:
parent
31d117d3ab
commit
2d05e25913
1 changed files with 42 additions and 0 deletions
42
.github/workflows/build-sphinx-report.yml
vendored
Normal file
42
.github/workflows/build-sphinx-report.yml
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
name: Build report document
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
paths:
|
||||
- "report/**"
|
||||
jobs:
|
||||
html:
|
||||
name: "Build HTML document"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Checkout repository"
|
||||
uses: actions/checkout@v2
|
||||
- name: "Build HTML document with Sphinx"
|
||||
uses: ammaraskar/sphinx-action@master
|
||||
with:
|
||||
docs-folder: "report/"
|
||||
build-command: "make html"
|
||||
- name: "Create a gzip of the build"
|
||||
run: "tar -xvzf report/_build/report.html.tar.gz report/_build/html"
|
||||
- name: "Upload build artifact"
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: "report.html.tar.gz"
|
||||
path: "report/_build/report.html.tar.gz"
|
||||
latexpdf:
|
||||
name: "Build PDF document"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Checkout repository"
|
||||
uses: actions/checkout@v2
|
||||
- name: "Build Latex document with Sphinx"
|
||||
uses: ammaraskar/sphinx-action@master
|
||||
with:
|
||||
docs-folder: "report/"
|
||||
pre-build-command: "apt-get update -y && apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended"
|
||||
build-command: "make latexpdf"
|
||||
- name: "Upload build artifact"
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: "report.pdf"
|
||||
path: "report/_build/latex/sophon.pdf"
|
Loading…
Reference in a new issue