refactor: Las and laz I/O #247
Workflow file for this run
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
| # This workflow updates the sources of the Sphinx documentation based on the Python docstrings | |
| name: Update Sphinx Documentation | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| # Allows to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| concurrency: | |
| group: generate-docs | |
| cancel-in-progress: false | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| generate-docs: | |
| if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }} | |
| runs-on: ubuntu-latest | |
| container: | |
| image: josafatburmeister/pointtorch:cpu | |
| volumes: | |
| - ${{ github.workspace }}:/github/workspace | |
| steps: | |
| - name: Clean up potential remnants of past jobs | |
| uses: AutoModality/action-clean@v1.1.0 | |
| - name: Checkout out repository | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name || github.repository }} | |
| ref: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }} | |
| fetch-depth: 0 | |
| - name: Generate sphinx documentation sources from docstrings | |
| shell: bash | |
| run: | | |
| cd /github/workspace/ | |
| python -m pip install --upgrade .'[dev, docs]' | |
| sphinx-apidoc --force --module-first -t ./docs/source/_templates/ -o ./docs/source ./src | |
| - name: Commit and push documentation sources | |
| shell: bash | |
| run: | | |
| cd /github/workspace/ | |
| git config --global --add safe.directory $(realpath .) | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --global user.name "github-actions[bot]" | |
| if [[ -n "$(git status --porcelain)" ]]; then | |
| git add docs/source/* | |
| git commit -m "docs: update docs [${{ github.event_name == 'pull_request' && github.event.pull_request.title || github.ref_name }}] [skip-ci]" | |
| git push "https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git" \ | |
| HEAD:${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }} | |
| fi |