Merge pull request #43 from mosquito/feature/nested-groups #89
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: docs | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Python dependencies | |
| run: uv sync --group docs | |
| - name: Test documentation examples | |
| run: uv run make -C docs test | |
| env: | |
| FORCE_COLOR: 1 | |
| build-pdf: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/${{ github.repository }}:docs-build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Python dependencies | |
| run: uv sync --group docs | |
| - name: Build PDF documentation | |
| run: uv run make -C docs latexpdf | |
| - name: Upload PDF artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: documentation-pdf | |
| path: docs/_build/latex/argclass.pdf | |
| build-html: | |
| needs: build-pdf | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Python dependencies | |
| run: uv sync --group docs | |
| - name: Download PDF artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: documentation-pdf | |
| path: docs/_static | |
| - name: Build HTML documentation | |
| run: uv run make -C docs html | |
| env: | |
| FORCE_COLOR: 1 | |
| - name: Upload HTML documentation | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: documentation | |
| path: docs/_build/html | |
| publish: | |
| needs: build-html | |
| runs-on: ubuntu-latest | |
| container: rclone/rclone:latest | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| env: | |
| RCLONE_CONFIG_S3_TYPE: s3 | |
| RCLONE_CONFIG_S3_PROVIDER: ${{ secrets.AWS_S3_PROVIDER }} | |
| RCLONE_CONFIG_S3_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| RCLONE_CONFIG_S3_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| RCLONE_CONFIG_S3_ENDPOINT: ${{ secrets.AWS_S3_ENDPOINT_URL }} | |
| RCLONE_CONFIG_S3_REGION: ${{ secrets.AWS_REGION }} | |
| steps: | |
| - name: Download documentation artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: documentation | |
| path: docs/_build/html | |
| - name: Publish to S3 | |
| run: | | |
| rclone sync docs/_build/html/ "s3:${{ secrets.AWS_S3_BUCKET }}/" \ | |
| --header-upload "Cache-Control: max-age=3600" |