docs: add publications section #18
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 Documentation | |
| on: | |
| push: | |
| branches: [ main ] # Change this to your default branch if different | |
| pull_request: | |
| branches: [ main ] # Change this to your default branch if different | |
| workflow_dispatch: | |
| jobs: | |
| deploy-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.9' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e '.[dev,docs]' # Install package in development mode with dev and docs extras | |
| - name: Install pandoc | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y pandoc | |
| - name: Build documentation | |
| run: | | |
| cd docs | |
| # Clean previous builds | |
| make clean | |
| # Ensure static directories exist | |
| mkdir -p _build/html/_static/css | |
| mkdir -p _build/html/_static/images | |
| # Copy static files | |
| cp -r source/_static/css/* _build/html/_static/css/ || true | |
| cp -r source/_static/images/* _build/html/_static/images/ || true | |
| cp source/_static/*.png _build/html/_static/ 2>/dev/null || true | |
| cp source/_static/*.svg _build/html/_static/ 2>/dev/null || true | |
| # Build HTML documentation | |
| make html | |
| # Create .nojekyll file to prevent GitHub Pages from processing with Jekyll | |
| touch _build/html/.nojekyll | |
| # Ensure all static files have correct permissions | |
| find _build/html -type d -exec chmod 755 {} \; | |
| find _build/html -type f -exec chmod 644 {} \; | |
| - name: Deploy to GitHub Pages | |
| if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| folder: docs/_build/html | |
| branch: gh-pages # The branch the action should deploy to | |
| clean: true # Automatically remove deleted files from the deploy branch | |
| token: ${{ github.token }} | |
| repository-name: ${{ github.repository_owner }}/${{ github.event.repository.name }} | |
| commit-message: 'Deploy docs: ${{ github.sha }}' |