Start building Dash/Zeal docsets for docs (#1056)
This commit is contained in:
parent
287c6cedc2
commit
6c46bb19a0
|
@ -0,0 +1,39 @@
|
|||
---
|
||||
name: Build docset
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: ["*"]
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
PIP_DISABLE_PIP_VERSION_CHECK: 1
|
||||
PIP_NO_PYTHON_VERSION_WARNING: 1
|
||||
|
||||
permissions: # added using https://github.com/step-security/secure-workflows
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
docset:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@v1
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0 # get correct version once we switch to hatch-vcs
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- run: pip install tox
|
||||
|
||||
- run: tox -e docset
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: docset
|
||||
path: attrs.tgz
|
|
@ -12,6 +12,8 @@
|
|||
.vscode
|
||||
build
|
||||
dist
|
||||
docs/_build/
|
||||
docs/_build
|
||||
htmlcov
|
||||
tmp*
|
||||
attrs.docset
|
||||
attrs.tgz
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 637 B |
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
15
tox.ini
15
tox.ini
|
@ -114,3 +114,18 @@ commands =
|
|||
nodeenv --prebuilt --node=lts --force {envdir}
|
||||
npm install -g --no-package-lock --no-save pyright
|
||||
pytest tests/test_pyright.py -vv
|
||||
|
||||
|
||||
[testenv:docset]
|
||||
deps = doc2dash
|
||||
extras = docs
|
||||
allowlist_externals =
|
||||
rm
|
||||
cp
|
||||
tar
|
||||
commands =
|
||||
rm -rf attrs.docset attrs.tgz docs/_build
|
||||
sphinx-build -n -T -W -b html -d {envtmpdir}/doctrees docs docs/_build/html
|
||||
doc2dash --index-page index.html --icon docs/_static/docset-icon.png --online-redirect-url https://www.attrs.org/en/latest/ docs/_build/html
|
||||
cp docs/_static/docset-icon@2x.png attrs.docset/icon@2x.png
|
||||
tar --exclude='.DS_Store' -cvzf attrs.tgz attrs.docset
|
||||
|
|
Loading…
Reference in New Issue