|
1 | | -# Building and hosting documentation for PACKAGE_NAME |
2 | | -# |
3 | | -# Notes: |
4 | | -# - After the first run of this workflow: |
5 | | -# - Within the project repo, navigate to Setting/Github Pages |
6 | | -# - set `the source branch to `gh-pages/(root))`. |
7 | | -# - Uncomment everything below the following line to enable the workflow. |
8 | | -#--------------------------------------------------------------------------- |
9 | | - |
10 | | - name: Build Docs |
11 | | - |
12 | | - on: |
13 | | - push: |
14 | | - # Sequence of patterns matched against refs/tags |
15 | | - tags: |
16 | | - - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 |
17 | | - workflow_dispatch: |
18 | | - inputs: |
19 | | - version: |
20 | | - description: Manual Doc Build |
21 | | - default: test |
22 | | - required: false |
23 | | - jobs: |
24 | | - docs: |
25 | | - name: build & push docs |
26 | | - runs-on: ${{ matrix.os }} |
27 | | - timeout-minutes: 90 |
28 | | - strategy: |
29 | | - matrix: |
30 | | - os: ['ubuntu-latest'] |
31 | | - environment-file: [ci/envs/314-latest.yaml] |
32 | | - experimental: [false] |
33 | | - defaults: |
34 | | - run: |
35 | | - shell: bash -l {0} |
36 | | - |
37 | | - steps: |
38 | | - - name: checkout repo |
39 | | - uses: actions/checkout@v4 |
40 | | - |
41 | | - - name: setup micromamba |
42 | | - uses: mamba-org/setup-micromamba@v2 |
43 | | - with: |
44 | | - environment-file: ${{ matrix.environment-file }} |
45 | | - micromamba-version: 'latest' |
46 | | - |
47 | | - - name: Install Dependencies |
48 | | - run: | |
49 | | - # Install ipykernel and jupyter into the 'test' environment |
50 | | - micromamba install -n test ipykernel jupyter -c conda-forge -y |
51 | | -
|
52 | | - - name: Register Jupyter kernel "python3" (for nbsphinx) |
53 | | - run: | |
54 | | - python -m ipykernel install --sys-prefix --name python3 --display-name "Python 3" |
55 | | - jupyter kernelspec list |
56 | | -
|
57 | | - - name: make docs |
58 | | - run: | |
59 | | - pip install -e . --no-deps --force-reinstall |
60 | | - cd docs; make html |
61 | | -
|
62 | | - - name: Publish to Github Pages |
63 | | - uses: peaceiris/actions-gh-pages@v4 |
64 | | - with: |
65 | | - github_token: ${{ secrets.GITHUB_TOKEN }} |
66 | | - publish_dir: docs/build/html/ |
67 | | - keep_files: false |
| 1 | +--- |
| 2 | +name: Build Docs |
| 3 | + |
| 4 | +on: |
| 5 | + push: |
| 6 | + # Sequence of patterns matched against refs/tags |
| 7 | + tags: |
| 8 | + - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 |
| 9 | + workflow_dispatch: |
| 10 | + inputs: |
| 11 | + version: |
| 12 | + description: Manual Doc Build |
| 13 | + default: test |
| 14 | + required: false |
| 15 | +jobs: |
| 16 | + docs: |
| 17 | + name: build & push docs |
| 18 | + runs-on: ${{ matrix.os }} |
| 19 | + timeout-minutes: 90 |
| 20 | + strategy: |
| 21 | + matrix: |
| 22 | + os: ['ubuntu-latest'] |
| 23 | + environment-file: [ci/envs/314-latest.yaml] |
| 24 | + experimental: [false] |
| 25 | + defaults: |
| 26 | + run: |
| 27 | + shell: bash -l {0} |
| 28 | + |
| 29 | + steps: |
| 30 | + - name: checkout repo |
| 31 | + uses: actions/checkout@v6 |
| 32 | + |
| 33 | + - name: setup micromamba |
| 34 | + uses: mamba-org/setup-micromamba@v3 |
| 35 | + with: |
| 36 | + environment-file: ${{ matrix.environment-file }} |
| 37 | + micromamba-version: 'latest' |
| 38 | + |
| 39 | + - name: Install Dependencies |
| 40 | + run: | |
| 41 | + # Install ipykernel and jupyter into the 'test' environment |
| 42 | + micromamba install -n test ipykernel jupyter -c conda-forge -y |
| 43 | +
|
| 44 | + - name: Register Jupyter kernel "python3" (for nbsphinx) |
| 45 | + run: | |
| 46 | + python -m ipykernel install --sys-prefix --name python3 --display-name "Python 3" |
| 47 | + jupyter kernelspec list |
| 48 | +
|
| 49 | + - name: make docs |
| 50 | + run: | |
| 51 | + pip install -e . --no-deps --force-reinstall |
| 52 | + cd docs; make html |
| 53 | +
|
| 54 | + - name: Publish to Github Pages |
| 55 | + uses: peaceiris/actions-gh-pages@v4 |
| 56 | + with: |
| 57 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 58 | + publish_dir: docs/build/html/ |
| 59 | + keep_files: false |
0 commit comments