|
1 | 1 | # This is a basic workflow to help you get started with Actions |
2 | | -name: Build and publish |
| 2 | +name: Test, build and publish |
3 | 3 |
|
4 | 4 | # Controls when the action will run. |
5 | 5 | on: |
6 | | - # Triggers the workflow on push or pull request events but only for the master branch |
7 | 6 | push: |
8 | | - branches: [dokken/jupyterbook] |
| 7 | + branches: ["*"] |
9 | 8 |
|
10 | 9 | # Allows you to run this workflow manually from the Actions tab |
11 | 10 | workflow_dispatch: |
|
17 | 16 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel |
18 | 17 | jobs: |
19 | 18 | # This workflow contains a single job called "build" |
20 | | - build-publish: |
| 19 | + test: |
21 | 20 | # The type of runner that the job will run on |
22 | 21 | runs-on: ubuntu-latest |
23 | | - container: dokken92/dolfinx_custom:v0.5.0 |
| 22 | + container: ghcr.io/jorgensd/dolfinx-tutorial:v0.5.1 |
24 | 23 |
|
25 | 24 | env: |
26 | 25 | HDF5_MPI: "ON" |
@@ -74,13 +73,37 @@ jobs: |
74 | 73 | mpirun -n 3 python3 convergence.py |
75 | 74 | mpirun -n 3 python3 compiler_parameters.py |
76 | 75 |
|
| 76 | + build-book: |
| 77 | + # The type of runner that the job will run on |
| 78 | + runs-on: ubuntu-latest |
| 79 | + container: ghcr.io/jorgensd/dolfinx-tutorial:v0.5.1 |
| 80 | + |
| 81 | + env: |
| 82 | + HDF5_MPI: "ON" |
| 83 | + CC: mpicc |
| 84 | + HDF5_DIR: "/usr/local/" |
| 85 | + DISPLAY: ":99.0" |
| 86 | + PYVISTA_OFF_SCREEN: false |
| 87 | + PYVISTA_JUPYTER_BACKEND: "static" |
| 88 | + |
| 89 | + # Steps represent a sequence of tasks that will be executed as part of the job |
| 90 | + steps: |
| 91 | + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
| 92 | + - uses: actions/checkout@v2 |
77 | 93 | # Runs a single command using the runners shell |
78 | 94 | - name: Build the book |
79 | | - run: | |
80 | | - PYVISTA_JUPYTER_BACKEND=static PYVISTA_OFF_SCREEN=false jupyter-book build -W . |
| 95 | + run: |
| 96 | + jupyter-book build -W . |
| 97 | + |
| 98 | + publish: |
| 99 | + runs-on: ubuntu-latest |
| 100 | + |
| 101 | + if: github.ref == 'refs/heads/dokken/jupyter-book' |
| 102 | + needs: [build-book] |
| 103 | + steps: |
81 | 104 | # Push book to HTML to github pages |
82 | | - - name: GitHub Pages action |
83 | | - |
84 | | - with: |
85 | | - github_token: ${{ secrets.GITHUB_TOKEN }} |
86 | | - publish_dir: ./_build/html |
| 105 | + - name: GitHub Pages action |
| 106 | + |
| 107 | + with: |
| 108 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 109 | + publish_dir: ./_build/html |
0 commit comments