File: docs.yml

package info (click to toggle)
neuron 8.2.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 34,760 kB
  • sloc: cpp: 149,571; python: 58,465; ansic: 50,329; sh: 3,510; xml: 213; pascal: 51; makefile: 35; sed: 5
file content (88 lines) | stat: -rw-r--r-- 2,929 bytes parent folder | download | duplicates (2)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: NEURON Documentation

concurrency:
  group: ${{ github.workflow }}#${{ github.ref }}
  cancel-in-progress: true

on:
  push:
    branches:
      - master
      - release/**
  pull_request:
    branches:
      - master
      - release/**

env:
  DEFAULT_PY_VERSION: '3.11'

jobs:
  documentation:
    runs-on: ubuntu-20.04

    name: Documentation

    timeout-minutes: 25

    steps:

      - name: Install apt packages
        run: |
          sudo apt-get update --fix-missing
          sudo apt-get install build-essential libopenmpi-dev libmpich-dev libx11-dev libxcomposite-dev mpich openmpi-bin
          sudo apt-get install ffmpeg doxygen pandoc
        shell: bash

      - name: Set up Python@${{ env.DEFAULT_PY_VERSION }}
        uses: actions/setup-python@v5
        with:
          python-version: ${{ env.DEFAULT_PY_VERSION }}

      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Install Python dependencies
        working-directory: ${{runner.workspace}}/nrn
        run: |
          python -m pip install --upgrade pip -r nrn_requirements.txt

      - name: Install Python documentation dependencies
        working-directory: ${{runner.workspace}}/nrn
        run: |
          python -m pip install --upgrade -r docs/docs_requirements.txt

      - name: Documentation
        id: documentation
        shell: bash
        working-directory: ${{runner.workspace}}/nrn
        run:  |
          echo "-------- NEURON wheel --------";
          python setup.py build_ext bdist_wheel;
          neuron_wheel=dist/NEURON*.whl;
          echo "-------- install wheel --------"
          python -m pip install $neuron_wheel;
          echo "-------- now build docs--------";
          python setup.py docs;
          echo "-------- disable jekyll--------";
          pushd docs/_build;
          touch .nojekyll;
          echo "-------- OK to deploy! --------";
          echo "OK_TO_DEPLOY_DOCS=true" >> $GITHUB_ENV

      # This step will set up an SSH connection on tmate.io for live debugging.
      # To enable it, you have to:
      #   * add 'live-debug-docs' to your PR title
      #   * push something to your PR branch (note that just re-running the pipeline disregards the title update)
      - name: live debug session on failure (manual steps required, check `.github/docs.yml`)
        if: failure() && contains(github.event.pull_request.title, 'live-debug-docs')
        uses: mxschmitt/action-tmate@v3

      - name: Deploy 🚀
        uses: JamesIves/github-pages-deploy-action@v4
        if: env.OK_TO_DEPLOY_DOCS == 'true' && github.ref == 'refs/heads/master'
        with:
          branch: gh-pages # The branch the action should deploy to.
          folder: ${{runner.workspace}}/nrn/docs/_build # The folder the action should deploy.
          single-commit: true #have a single commit on the deployment branch instead of maintaining the full history