| 1 | --- |
| 2 | name: s2n-tls Documentation |
| 3 | on: |
| 4 | push: |
| 5 | branches: [main] |
| 6 | pull_request: |
| 7 | branches: [main] |
| 8 | merge_group: |
| 9 | types: [checks_requested] |
| 10 | branches: [main] |
| 11 | |
| 12 | permissions: |
| 13 | contents: write |
| 14 | pages: write |
| 15 | |
| 16 | jobs: |
| 17 | typos: |
| 18 | runs-on: ubuntu-latest |
| 19 | steps: |
| 20 | - uses: actions/checkout@v7 |
| 21 | with: |
| 22 | submodules: true |
| 23 | |
| 24 | - name: Install rust toolchain |
| 25 | id: toolchain |
| 26 | run: | |
| 27 | rustup toolchain install stable --profile minimal |
| 28 | rustup override set stable |
| 29 | |
| 30 | - uses: camshaft/install@v1 |
| 31 | with: |
| 32 | crate: typos-cli |
| 33 | bins: typos |
| 34 | |
| 35 | - name: Run typos |
| 36 | run: | |
| 37 | typos -c .github/config/typos.toml --format json | tee /tmp/typos.json | jq -rs '.[] | "::error file=\(.path),line=\(.line_num),col=\(.byte_offset)::\(.typo) should be \"" + (.corrections // [] | join("\" or \"") + "\"")' |
| 38 | cat /tmp/typos.json |
| 39 | ! grep -q '[^[:space:]]' /tmp/typos.json |
| 40 | |
| 41 | generate-doxygen: |
| 42 | runs-on: ubuntu-latest |
| 43 | steps: |
| 44 | - name: Checkout repo |
| 45 | uses: actions/checkout@v7 |
| 46 | - name: Create Documentation |
| 47 | run: | |
| 48 | .github/s2n_doxygen.sh |
| 49 | - name: Deploy documentation to gh-pages |
| 50 | uses: peaceiris/actions-gh-pages@v4 |
| 51 | if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} |
| 52 | with: |
| 53 | github_token: ${{ secrets.GITHUB_TOKEN }} |
| 54 | destination_dir: ./doxygen |
| 55 | publish_dir: ./docs/doxygen/output/html |
| 56 | |
| 57 |