Spaces:
Sleeping
Sleeping
File size: 1,193 Bytes
e072ef3 ae96818 61ab7a6 e072ef3 2a3f899 e072ef3 96f8639 e072ef3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
name: docs
on:
push:
branches:
- 'master'
paths:
- 'pysr/**'
- '.github/workflows/docs.yml'
- 'docs/**'
- 'setup.py'
- 'README.md'
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- name: "Set up Python"
uses: actions/setup-python@v1
with:
python-version: 3.9.10
- name: "Install pydoc-markdown"
run: pip install pydoc-markdown
- name: "Set up npm"
uses: actions/setup-node@v2
with:
node-version: '14'
- name: "Install docsify"
run: npm install -g docsify
- name: "Build API docs"
run: |
cat README.md | grep -v 'pysr_logo.svg' > docs/README.md
pydoc-markdown --build --site-dir build -vv
cp docs/build/content/docs/api*.md docs/
for f in docs/api*.md; do mv "$f" "$f.bkup" && cat "$f.bkup" | sed '1,4d' > "$f" && rm "$f.bkup"; done
- name: "Deploy documentation"
uses: JamesIves/github-pages-deploy-action@v4.2.3
with:
branch: gh-pages
folder: docs |