2021-11-17 19:38:49 +00:00
|
|
|
name: Build report document
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
|
|
|
paths:
|
2021-11-21 00:06:24 +00:00
|
|
|
- ".github/workflows/build-sphinx-report.yml"
|
2021-11-17 19:38:49 +00:00
|
|
|
- "report/**"
|
2021-11-21 04:09:20 +00:00
|
|
|
- "backend/**"
|
2021-11-17 19:38:49 +00:00
|
|
|
jobs:
|
2021-11-21 00:10:15 +00:00
|
|
|
html:
|
|
|
|
name: "Build HTML document"
|
2021-11-17 19:38:49 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: "Checkout repository"
|
|
|
|
uses: actions/checkout@v2
|
2021-11-21 05:15:56 +00:00
|
|
|
with:
|
|
|
|
lfs: true
|
|
|
|
- name: "Checkout LFS objects"
|
|
|
|
run: git lfs checkout
|
2021-11-21 00:06:24 +00:00
|
|
|
- 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/
|
2021-11-21 04:16:21 +00:00
|
|
|
run: poetry install --no-interaction
|
2021-11-21 04:07:26 +00:00
|
|
|
- name: "Find Poetry Python environment"
|
2021-11-21 04:10:42 +00:00
|
|
|
working-directory: backend/
|
2021-11-21 04:07:26 +00:00
|
|
|
run: echo "pythonLocation=$(poetry env list --full-path | cut -f1 -d' ')/bin" >> $GITHUB_ENV
|
2021-11-17 19:38:49 +00:00
|
|
|
- name: "Build HTML document with Sphinx"
|
2021-11-21 04:16:21 +00:00
|
|
|
working-directory: report/
|
2021-11-21 04:22:41 +00:00
|
|
|
run: |
|
|
|
|
source $pythonLocation/activate
|
|
|
|
make html
|
2021-11-21 04:38:31 +00:00
|
|
|
- name: "Create a gzipped tarball of the build"
|
2021-11-21 04:47:27 +00:00
|
|
|
working-directory: ${{ github.workspace }}
|
2021-11-21 04:38:31 +00:00
|
|
|
run: tar -cvzf report/build/report.html.tar.gz report/build/html
|
2021-11-17 19:38:49 +00:00
|
|
|
- name: "Upload build artifact"
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: "report.html.tar.gz"
|
2021-11-21 04:38:31 +00:00
|
|
|
path: "report/build/report.html.tar.gz"
|