Macos redirector rust side #399
Workflow file for this run
This file contains 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: | |
- main | |
pull_request: | |
# security: restrict permissions for CI jobs. | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
# Build the documentation and upload the static HTML files as an artifact. | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install maturin[zig] from PyPI | |
uses: install-pinned/maturin-with-zig@59341946682d2f69df7150f6941f53e026e344fd | |
- name: Install mypy from PyPI | |
uses: install-pinned/mypy@0ac9691d218a55b59b345debcd9d4b3ca17b391b | |
- name: Install pdoc from PyPI | |
uses: install-pinned/pdoc@7ed463fdd937004663bcdd7b43c303e9df472c92 | |
- run: maturin build | |
working-directory: ./ffi | |
- run: pip install --no-index --find-links target/wheels/ mitmproxy_rs | |
- run: stubtest --allowlist ffi/stubtest-allowlist.txt --mypy-config-file ffi/pyproject.toml mitmproxy_rs | |
- run: pdoc -o docs/ mitmproxy_rs | |
- uses: actions/upload-pages-artifact@v1 | |
with: | |
path: docs/ | |
# Deploy the artifact to GitHub pages. | |
# This is a separate job so that only actions/deploy-pages has the necessary permissions. | |
deploy: | |
if: github.ref == 'refs/heads/main' | |
needs: build | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- id: deployment | |
uses: actions/deploy-pages@v2 |