mirror of
https://github.com/astral-sh/ruff
synced 2026-01-21 21:40:51 -05:00
## Summary This PR adds a separate configuration file to enable us to turn on [Insiders-only plugins](https://squidfunk.github.io/mkdocs-material/insiders/getting-started/#built-in-plugins). I've turned on the `typeset` plugin which ensures that the settings on the left-hand navigation pane render as code: <img width="1792" alt="Screen Shot 2023-07-05 at 6 27 20 PM" src="https://github.com/astral-sh/ruff/assets/1309177/c93676dd-bb48-417a-9d3b-528bf001e9b7">
37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
name: mkdocs
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
release:
|
|
types: [ published ]
|
|
|
|
jobs:
|
|
mkdocs:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
CF_API_TOKEN_EXISTS: ${{ secrets.CF_API_TOKEN != '' }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-python@v4
|
|
- name: "Add SSH key"
|
|
uses: webfactory/ssh-agent@v0.7.0
|
|
with:
|
|
ssh-private-key: ${{ secrets.MKDOCS_INSIDERS_SSH_KEY }}
|
|
- name: "Install Rust toolchain"
|
|
run: rustup show
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: "Install dependencies"
|
|
run: pip install -r docs/requirements-insiders.txt
|
|
- name: "Copy README File"
|
|
run: |
|
|
python scripts/transform_readme.py --target mkdocs
|
|
python scripts/generate_mkdocs.py
|
|
mkdocs build --strict -f mkdocs.insiders.yml
|
|
- name: "Deploy to Cloudflare Pages"
|
|
if: ${{ env.CF_API_TOKEN_EXISTS == 'true' }}
|
|
uses: cloudflare/wrangler-action@2.0.0
|
|
with:
|
|
apiToken: ${{ secrets.CF_API_TOKEN }}
|
|
accountId: ${{ secrets.CF_ACCOUNT_ID }}
|
|
command: pages publish site --project-name=ruff-docs --branch ${GITHUB_HEAD_REF} --commit-hash ${GITHUB_SHA}
|