Merge pull request #11 from RaymondWJang/add-cache-func #6
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: Generate and Publish Documentation | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Generate Documentation | |
run: | | |
pdoc --html --force --output-dir ./docs reference_network | |
touch docs/.nojekyll # Prevents GitHub Pages from ignoring files with underscores | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs # The directory to deploy (relative to the root of the repository) | |
publish_branch: gh-pages # The branch you want to deploy to (gh-pages branch) | |
keep_files: true # Set to true to keep files already in the gh-pages branch |