.github/workflows/linters: show diff #7
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: "DOCUMENTATION" | |
| on: | |
| push: | |
| branches: | |
| - "master" | |
| pull_request: | |
| branches: | |
| - "*" | |
| jobs: | |
| build_and_deploy: | |
| runs-on: ${{ matrix.os }} | |
| if: ${{ github.ref == 'refs/heads/master' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| python-version: [3.8] | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Latex | |
| run: | | |
| sudo apt install texlive-latex-extra | |
| sudo apt install dvipng | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install --progress-bar off . | |
| pip install -r doc/requirements.txt | |
| - name: Compute documentation | |
| run: | | |
| mkdir -p tmp/doc | |
| sphinxdoc -v 2 -p . -n caravel -o tmp/doc | |
| cd tmp/doc | |
| make raw-html | |
| ls source/_static | |
| ls build/html/_static | |
| cp -r source/_static/* build/html/_static | |
| cd ../.. | |
| - name: Upload documentation as an artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: html-documentation | |
| retention-days: 15 | |
| path: | | |
| tmp/doc/build/html | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: tmp/doc/build/html | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| if: ${{ github.ref != 'refs/heads/master' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| python-version: [3.8] | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Latex | |
| run: | | |
| sudo apt install texlive-latex-extra | |
| sudo apt install dvipng | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install --progress-bar off . | |
| pip install -r doc/requirements.txt | |
| - name: Compute documentation | |
| run: | | |
| mkdir -p tmp/doc | |
| sphinxdoc -v 2 -p . -n caravel -o tmp/doc | |
| cd tmp/doc | |
| make raw-html | |
| ls source/_static | |
| ls build/html/_static | |
| cp -r source/_static/* build/html/_static | |
| cd ../.. |