fenn-updated #70
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: Build Docs | |
| on: | |
| push: | |
| branches: [main] | |
| repository_dispatch: | |
| types: [fenn-updated] | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 3 * * *' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout dev-docs | |
| uses: actions/checkout@v4 | |
| - name: Checkout pyfenn/fenn | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: pyfenn/fenn | |
| path: fenn | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install Graphviz | |
| run: sudo apt-get install -y graphviz | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install sphinx | |
| pip install -r requirements.txt | |
| pip install -e "fenn/[torch,vision]" | |
| - name: Generate UML diagrams | |
| run: make uml FENN_PKG=fenn/fenn | |
| - name: Build HTML docs | |
| run: make html | |
| - name: Deploy to build branch | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: _build/html | |
| publish_branch: build | |
| force_orphan: true |