Build Website #296
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: Build Website | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- docs | |
permissions: | |
contents: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 10 | |
- name: Set up Python | |
uses: actions/[email protected] | |
with: | |
python-version: "3.11.3" | |
- name: Install Dependencies | |
run: pip install -r requirements.txt | |
- name: Generate JSON Spec Documentation | |
run: | | |
git clone --depth=1 https://github.com/polyfem/polyfem.git | |
git clone --depth=1 https://github.com/polyfem/polysolve.git | |
git clone --depth=1 https://github.com/geometryprocessing/json-spec-engine.git | |
pip install -r ./json-spec-engine/requirements.txt | |
python ./json-spec-engine/docs/spec2html.py -i ./polyfem/json-specs/input-spec.json --include-dirs ./polyfem/json-specs ./polysolve -o ./docs/_json_spec.md | |
python ./json-spec-engine/scripts/generate_defaults.py -i ./polyfem/json-specs/input-spec.json --include-dirs ./polyfem/json-specs ./polysolve -o ./docs/_json_defaults.json | |
cp ./polyfem/LICENSE ./docs/_polyfem_license.txt | |
- name: Deploy MkDocs | |
run: mkdocs gh-deploy --force |