-
Notifications
You must be signed in to change notification settings - Fork 25
64 lines (51 loc) · 1.6 KB
/
build-userguide.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Build Userguide pdf
on:
release:
types: [created]
push:
branches:
- release/*
- doc/*
env:
IS_RELEASE: ${{ github.event_name == 'release' && github.event.action == 'created' }}
jobs:
build:
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip3 install -r requirements-doc.txt
- name: Install libraries
run: |
sudo apt-get update --fix-missing
sudo apt-get install latexmk texlive-latex-recommended texlive-formats-extra
- name: Generate PDF for user-guide
shell: bash
run: |
PDF_NAME=antares-general-reference-guide.pdf
cd docs/pdf-doc-generation-with-sphinx
bash create_pdf_doc.sh $PDF_NAME
echo "PDF_PATH=docs/pdf-doc-generation-with-sphinx/$PDF_NAME" >> $GITHUB_ENV
echo "PDF_PATH_ASSET= [\"docs/pdf-doc-generation-with-sphinx/$PDF_NAME\"]" >> $GITHUB_ENV
- name: user guide upload
uses: actions/upload-artifact@v3
with:
name: pdf-reference-guide
path: ${{ env.PDF_PATH }}
- name: Upload user guide as release asset
if: ${{ env.IS_RELEASE == 'true' }}
uses: alexellis/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: ${{ env.PDF_PATH_ASSET }}