This repository has been archived by the owner on May 15, 2024. It is now read-only.
Peter's attempt to get the docs working. (#39) #4
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: CI docs | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-pages: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: pip | |
cache-dependency-path: | | |
requirements*.txt | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install -r requirements-docs.txt | |
pip freeze | |
- name: Build base docs | |
run: | | |
gen-doc schemas/base.yaml -d docs/source/gen-doc --template-directory docs/source/_templates | |
- name: Build FileType docs | |
run: | | |
gen-doc schemas/filetype.yml -d docs/source/gen-doc --template-directory docs/source/_templates | |
- name: Build Extractor docs | |
run: | | |
gen-doc schemas/extractor.yml -d docs/source/gen-doc --template-directory docs/source/_templates | |
- name: Build Sphinx docs | |
run: | | |
sphinx-build -b html docs/source public/main | |
- name: Upload docs artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: public-main | |
path: public/main | |
deploy-pages: | |
runs-on: ubuntu-latest | |
needs: | |
- build-pages | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- uses: actions/download-artifact@v3 | |
with: | |
name: public-main | |
path: public/main | |
- uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public | |
keep_files: true |