name: Build documentation on: workflow_call: inputs: tag: description: "Tag of DOLFINx docker image" default: "stable" required: true type: string workflow_dispatch: inputs: tag: description: "Tag of DOLFINx docker image" default: "stable" required: true type: string pull_request: branches: - main schedule: - cron: "0 8 * * *" env: DEB_PYTHON_INSTALL_LAYOUT: deb_system DEFAULT_TAG: stable ARTIFACT_NAME: docs PUBLISH_DIR: ./_build/html PIP_NO_BINARY: h5py 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@v7 - name: Update pip and extra deps run: | python3 -m pip install --upgrade pip setuptools python3 -m pip install --no-binary=h5py h5py python3 -m pip install . --group docs - name: Install dependencies run: python3 -m pip install -e . --no-build-isolation - name: Build docs run: jupyter book build . - name: Upload documentation as artifact uses: actions/upload-artifact@v7 if: always() with: name: ${{ env.ARTIFACT_NAME }} path: ${{ env.PUBLISH_DIR }} if-no-files-found: error