rm untitled file #127
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: deploy-docs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| # Compile package with in-source build | |
| - name: Install | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -r requirements.txt | |
| export CYTHON_BUILD_FOR_DOC=1 | |
| python setup.py install # do not use "pip install ." as it fails | |
| # Build sphinx in /docs/build, copy /docs/doxygen/output/html to /docs/build/doxygen | |
| - name: Build Sphinx | |
| run: | | |
| sudo apt-get install pandoc -y | |
| python -m pip install -r docs/requirements.txt | |
| export PATH=$HOME/.local/bin:$PATH | |
| make clean html --directory=docs | |
| touch docs/build/html/.nojekyll | |
| echo 'Visit [Documentation](https://ameli.github.io/detkit/index.html).' > docs/build/html/README.md | |
| # Deploy to github pages | |
| - name: Deploy | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| folder: docs/build/html | |
| branch: gh-pages |