Sanitize secrets during parsing #36
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: | |
| build: | |
| 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 | |
| - name: Install LaTeX dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y texlive-full latexmk | |
| - name: Build PDF documentation | |
| run: uv run make -C docs latexpdf | |
| env: | |
| FORCE_COLOR: 1 | |
| - name: Copy PDF to static directory | |
| run: | | |
| mkdir -p docs/_static | |
| cp docs/_build/latex/argclass.pdf 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 | |
| - name: Upload PDF documentation | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: documentation-pdf | |
| path: docs/_build/latex/argclass.pdf | |
| publish: | |
| needs: build | |
| 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" |