File: build_docs.yml

package info (click to toggle)
adios4dolfinx 0.10.0.post0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 536 kB
  • sloc: python: 4,180; sh: 24; makefile: 7
file content (66 lines) | stat: -rw-r--r-- 1,616 bytes parent folder | download
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
65
66
name: Build documentation

on:
  workflow_call:
    inputs:
      tag:
        description: "Tag of DOLFINx docker image"
        default: "nightly"
        required: true
        type: string
  workflow_dispatch:
    inputs:
      tag:
        description: "Tag of DOLFINx docker image"
        default: "nightly"
        required: true
        type: string
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
  schedule:
    - cron: "0 8 * * *"

env:
  DEB_PYTHON_INSTALL_LAYOUT: deb_system
  DEFAULT_TAG: nightly
  ARTIFACT_NAME: docs
  PUBLISH_DIR: ./_build/html

jobs:
  get_image_tag:
    runs-on: ubuntu-latest
    outputs:
      image: ${{ steps.docker_tag.outputs.image }}
    steps:
      - id: docker_tag
        run: echo "image=${{ inputs.tag || env.DEFAULT_TAG }}" >> $GITHUB_OUTPUT

  build-docs:
    needs: get_image_tag
    runs-on: ubuntu-latest
    container: ghcr.io/fenics/dolfinx/dolfinx:${{ needs.get_image_tag.outputs.image }}

    steps:
      # This action sets the current path to the root of your github repo
      - uses: actions/checkout@v5

      - name: Update pip
        run: python3 -m pip install --break-system-packages --upgrade pip setuptools

      - name: Install dependencies
        run: python3 -m pip install --break-system-packages -e ".[docs]"

      - name: Build docs
        run: jupyter book build .

      - name: Upload documentation as artifact
        uses: actions/upload-artifact@v4
        if: always()
        with:
          name: ${{ env.ARTIFACT_NAME }}
          path: ${{ env.PUBLISH_DIR }}
          if-no-files-found: error