mirror of
https://github.com/Steffo99/sophon.git
synced 2024-12-22 14:54:22 +00:00
🔨 Try improving the sphinx actions
This commit is contained in:
parent
1c0e297e92
commit
b6a889e683
2 changed files with 56 additions and 10 deletions
33
.github/workflows/build-sphinx-report.yml
vendored
33
.github/workflows/build-sphinx-report.yml
vendored
|
@ -3,14 +3,34 @@ on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
paths:
|
paths:
|
||||||
|
- ".github/workflows/build-sphinx-report.yml"
|
||||||
- "report/**"
|
- "report/**"
|
||||||
jobs:
|
jobs:
|
||||||
html:
|
setup:
|
||||||
name: "Build HTML document"
|
name: "Setup the environment"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout repository"
|
- name: "Checkout repository"
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
- name: "Setup Python"
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.9
|
||||||
|
- name: "Setup Poetry"
|
||||||
|
uses: abatilo/actions-poetry@v2.0.0
|
||||||
|
with:
|
||||||
|
poetry-version: 1.1.11
|
||||||
|
- name: "Install backend dependencies"
|
||||||
|
working-directory: backend/
|
||||||
|
run: "poetry install --no-interaction"
|
||||||
|
html:
|
||||||
|
name: "Build HTML document"
|
||||||
|
needs: [ setup ]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: "Activate Python environment"
|
||||||
|
run: |
|
||||||
|
source $(poetry env list --full-path | cut -f1 -d" ")/bin/activate
|
||||||
- name: "Build HTML document with Sphinx"
|
- name: "Build HTML document with Sphinx"
|
||||||
uses: ammaraskar/sphinx-action@master
|
uses: ammaraskar/sphinx-action@master
|
||||||
with:
|
with:
|
||||||
|
@ -25,15 +45,18 @@ jobs:
|
||||||
path: "report/_build/report.html.tar.gz"
|
path: "report/_build/report.html.tar.gz"
|
||||||
latexpdf:
|
latexpdf:
|
||||||
name: "Build PDF document"
|
name: "Build PDF document"
|
||||||
|
needs: [ setup ]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout repository"
|
- name: "Activate Python environment"
|
||||||
uses: actions/checkout@v2
|
run: |
|
||||||
|
source $(poetry env list --full-path | cut -f1 -d" ")/bin/activate
|
||||||
|
- name: "Install Latex dependencies"
|
||||||
|
run: apt-get update -y && apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
|
||||||
- name: "Build Latex document with Sphinx"
|
- name: "Build Latex document with Sphinx"
|
||||||
uses: ammaraskar/sphinx-action@master
|
uses: ammaraskar/sphinx-action@master
|
||||||
with:
|
with:
|
||||||
docs-folder: "report/"
|
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"
|
build-command: "make latexpdf"
|
||||||
- name: "Upload build artifact"
|
- name: "Upload build artifact"
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
|
|
33
.github/workflows/build-sphinx-thesis.yml
vendored
33
.github/workflows/build-sphinx-thesis.yml
vendored
|
@ -3,14 +3,34 @@ on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
paths:
|
paths:
|
||||||
|
- ".github/workflows/build-sphinx-thesis.yml"
|
||||||
- "thesis/**"
|
- "thesis/**"
|
||||||
jobs:
|
jobs:
|
||||||
html:
|
setup:
|
||||||
name: "Build HTML document"
|
name: "Setup the environment"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout repository"
|
- name: "Checkout repository"
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
- name: "Setup Python"
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.9
|
||||||
|
- name: "Setup Poetry"
|
||||||
|
uses: abatilo/actions-poetry@v2.0.0
|
||||||
|
with:
|
||||||
|
poetry-version: 1.1.11
|
||||||
|
- name: "Install backend dependencies"
|
||||||
|
working-directory: backend/
|
||||||
|
run: "poetry install --no-interaction"
|
||||||
|
html:
|
||||||
|
name: "Build HTML document"
|
||||||
|
needs: [ setup ]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: "Activate Python environment"
|
||||||
|
run: |
|
||||||
|
source $(poetry env list --full-path | cut -f1 -d" ")/bin/activate
|
||||||
- name: "Build HTML document with Sphinx"
|
- name: "Build HTML document with Sphinx"
|
||||||
uses: ammaraskar/sphinx-action@master
|
uses: ammaraskar/sphinx-action@master
|
||||||
with:
|
with:
|
||||||
|
@ -25,15 +45,18 @@ jobs:
|
||||||
path: "thesis/_build/thesis.html.tar.gz"
|
path: "thesis/_build/thesis.html.tar.gz"
|
||||||
latexpdf:
|
latexpdf:
|
||||||
name: "Build PDF document"
|
name: "Build PDF document"
|
||||||
|
needs: [ setup ]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout repository"
|
- name: "Activate Python environment"
|
||||||
uses: actions/checkout@v2
|
run: |
|
||||||
|
source $(poetry env list --full-path | cut -f1 -d" ")/bin/activate
|
||||||
|
- name: "Install Latex dependencies"
|
||||||
|
run: apt-get update -y && apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
|
||||||
- name: "Build Latex document with Sphinx"
|
- name: "Build Latex document with Sphinx"
|
||||||
uses: ammaraskar/sphinx-action@master
|
uses: ammaraskar/sphinx-action@master
|
||||||
with:
|
with:
|
||||||
docs-folder: "thesis/"
|
docs-folder: "thesis/"
|
||||||
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"
|
build-command: "make latexpdf"
|
||||||
- name: "Upload build artifact"
|
- name: "Upload build artifact"
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
|
|
Loading…
Reference in a new issue