Skip to content

macos redirector app + CI #345

macos redirector app + CI

macos redirector app + CI #345

Workflow file for this run

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@99254730801be3d4d4af4c28b00b97103cbbd1ee
- name: Install mypy from PyPI
uses: install-pinned/mypy@2f13ebaba84a0401a61fea9a19e5c694342a92ac
- name: Install pdoc from PyPI
uses: install-pinned/pdoc@6f4a7067d107bd4e75d06a1877dff81d963c0ddd
- 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