aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/doc.yml
blob: 3e6ef91049de09f6083cbf448d3e4d4e649edfc6 (plain)
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
name: 'doc'

on:
  push:

jobs:
  linux:
    runs-on: ubuntu-latest
    name: '📓 Docs'
    steps:

    - name: '🧰 Checkout'
      uses: actions/checkout@v2

    - name: Build ghdl/doc
      run: |
        docker build -t ghdl/doc - <<-EOF
        FROM ghdl/vunit:llvm
        ENV PYTHONPATH=/src/pyGHDL
        RUN apt update -qq && apt install -y gnat-gps graphviz \
         && ln -s /usr/bin/pip3 /usr/bin/pip
        EOF

    - name: Run gnatdoc
      run: |
        cat > run.sh <<-EOF
        #!/usr/bin/env sh
        ./configure
        make
        gnatdoc -P./ghdl
        mkdir public
        mv gnatdoc public
        EOF
        chmod +x run.sh
        docker run --rm -v $(pwd):/src -w /src ghdl/doc ./run.sh

    - name: '📓 BuildTheDocs (BTD)'
      uses: buildthedocs/btd@v0
      with:
        token: ${{ github.token }}

    - name: '📤 Upload artifact: HTML and LaTeX'
      uses: actions/upload-artifact@v2
      with:
        name: doc
        path: |
          doc/_build/html
          doc/_build/latex