install package in editable mode for documentation to work #9
This file contains 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: Create documentation and push to gh-pages | |
on: | |
push: | |
branches: [main] | |
tags: ["v*.*.*"] | |
workflow_dispatch: | |
jobs: | |
make_docs: | |
name: Create and push docs (${{ github.ref_name }}) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out ${{ github.ref_name }} | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install packages | |
run: | | |
python -m pip install pdoc | |
python -m pip install -e . | |
- name: Run pdoc | |
run: | | |
pdoc fast_forward !fast_forward.examples -d google -o ./out | |
- name: Push to gh-pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./out | |
destination_dir: docs/${{ github.ref_name }} | |
make_directory_listing: | |
name: Create directory listings index file | |
runs-on: ubuntu-latest | |
needs: make_docs | |
steps: | |
- name: Check out gh-pages | |
uses: actions/checkout@v4 | |
with: | |
ref: gh-pages | |
- name: Remove old directory listing | |
run: | | |
rm -f docs/index.html | |
- name: Generate directory listing | |
uses: jayanta525/[email protected] | |
with: | |
FOLDER: . | |
- name: Push to gh-pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs | |
destination_dir: docs |