|
| 1 | +name: "Pull Request Docs Check" |
| 2 | + |
| 3 | +on: |
| 4 | +- pull_request |
| 5 | + |
| 6 | +jobs: |
| 7 | + build-pdf: |
| 8 | + runs-on: ubuntu-latest |
| 9 | + steps: |
| 10 | + - name: Checkout Repository |
| 11 | + uses: actions/checkout@v3 |
| 12 | + |
| 13 | + - name: Refresh Packages |
| 14 | + run: sudo apt-fast -y update |
| 15 | + |
| 16 | + - name: Install Dependencies |
| 17 | + run: xargs -a dependencies sudo apt-fast install -y |
| 18 | + |
| 19 | + - name: Python Setup |
| 20 | + uses: actions/setup-python@v4 |
| 21 | + with: |
| 22 | + python-version: 3.9 |
| 23 | + cache: 'pip' |
| 24 | + |
| 25 | + - name: Python Install Dependencies |
| 26 | + run: pip install -r docs/requirements.txt |
| 27 | + |
| 28 | + - name: Build PDF |
| 29 | + env: |
| 30 | + SPHINXOPTS: "-D html_context.commit=${{ github.sha }} -D version=latest -A display_github=true -A github_user=${{ github.repository_owner }} -A github_repo=${{ github.event.repository.name }} -A github_version=${{ github.ref_name }} -A conf_py_path=/docs/source/" |
| 31 | + run: make -C docs/ latexpdf |
| 32 | + |
| 33 | + - name: Archive PDF |
| 34 | + env: |
| 35 | + PR_NUMBER: ${{ github.event.number }} |
| 36 | + ID: ${{ github.run_attempt }} |
| 37 | + uses: actions/upload-artifact@v3 |
| 38 | + with: |
| 39 | + name: FTCDOCS-PDF |
| 40 | + path: | |
| 41 | + docs/build/latex/*.pdf |
| 42 | + FTCDOCS-PR-${{ env.PR_NUMBER }}-${{ env.ID }} |
| 43 | + if-no-files-found: error |
| 44 | + |
| 45 | + build-html: |
| 46 | + runs-on: ubuntu-latest |
| 47 | + steps: |
| 48 | + - name: Checkout Repository |
| 49 | + uses: actions/checkout@v3 |
| 50 | + |
| 51 | + - name: Refresh Packages |
| 52 | + run: sudo apt-fast -y update |
| 53 | + |
| 54 | + - name: Python Setup |
| 55 | + uses: actions/setup-python@v4 |
| 56 | + with: |
| 57 | + python-version: 3.9 |
| 58 | + cache: 'pip' |
| 59 | + |
| 60 | + - name: Python Install Dependencies |
| 61 | + run: pip install -r docs/requirements.txt |
| 62 | + |
| 63 | + - name: Build Site |
| 64 | + env: |
| 65 | + SPHINXOPTS: "-D html_context.commit=${{ github.sha }} -D version=latest -A display_github=true -A github_user=${{ github.repository_owner }} -A github_repo=${{ github.event.repository.name }} -A github_version=${{ github.ref_name }} -A conf_py_path=/docs/source/" |
| 66 | + run: make -C docs/ html |
| 67 | + |
| 68 | + - name: Archive Site |
| 69 | + uses: actions/upload-artifact@v3 |
| 70 | + with: |
| 71 | + name: FTCDOCS-HTML |
| 72 | + path: 'docs/build/html' |
| 73 | + if-no-files-found: error |
| 74 | + |
| 75 | + spelling-check: |
| 76 | + runs-on: ubuntu-latest |
| 77 | + steps: |
| 78 | + - name: Checkout Repository |
| 79 | + uses: actions/checkout@v3 |
| 80 | + |
| 81 | + - uses: reviewdog/action-misspell@v1 |
| 82 | + with: |
| 83 | + locale: "US" |
| 84 | + reporter: "github-check" |
| 85 | + |
| 86 | + link-check: |
| 87 | + runs-on: ubuntu-latest |
| 88 | + steps: |
| 89 | + - name: Checkout Repository |
| 90 | + uses: actions/checkout@v3 |
| 91 | + |
| 92 | + - name: Python Setup |
| 93 | + uses: actions/setup-python@v4 |
| 94 | + with: |
| 95 | + python-version: 3.9 |
| 96 | + cache: 'pip' |
| 97 | + |
| 98 | + - name: Python Install Dependencies |
| 99 | + run: pip install -r docs/requirements.txt |
| 100 | + |
| 101 | + - name: link-check |
| 102 | + run: make -C docs/ linkcheck SPHINXOPTS="-W --keep-going -n -q" |
| 103 | + |
| 104 | + - name: Archive Log |
| 105 | + if: ${{ failure() }} |
| 106 | + uses: actions/upload-artifact@v2 |
| 107 | + env: |
| 108 | + PR_NUMBER: ${{ github.event.number }} |
| 109 | + ID: ${{ github.run_attempt }} |
| 110 | + with: |
| 111 | + name: LINKCHECK |
| 112 | + path: docs/build/linkcheck/output.txt |
| 113 | + retention-days: 7 |
| 114 | + |
| 115 | + image-check: |
| 116 | + runs-on: ubuntu-latest |
| 117 | + steps: |
| 118 | + - name: Checkout Repository |
| 119 | + uses: actions/checkout@v3 |
| 120 | + |
| 121 | + - name: Python Setup |
| 122 | + uses: actions/setup-python@v4 |
| 123 | + with: |
| 124 | + python-version: 3.9 |
| 125 | + |
| 126 | + - name: Python Install Dependencies |
| 127 | + run: pip install -r docs/requirements.txt |
| 128 | + |
| 129 | + - name: image-check |
| 130 | + run: make -C docs/ imagecheck |
0 commit comments