update model #3
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: MD-Models Pipeline | |
on: | |
push: | |
paths: | |
- "specifications/*.md" | |
workflow_dispatch: | |
jobs: | |
generate: | |
name: Generate Pipeline | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Install MD-Models | |
run: cargo install --git https://github.com/JR-1991/md-models.git | |
- name: Run the generation pipeline | |
run: md-models pipeline -i gen.toml | |
- name: "Push generated code/schemes" | |
shell: "bash" | |
run: | | |
if [[ `git status --porcelain` ]]; then | |
git add --all | |
git config --global user.name 'MD-Models Bot' | |
git config --global user.email '[email protected]' | |
git commit -am "Model update" | |
git push | |
else | |
echo "Nothing changed!" | |
fi | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- uses: actions/cache@v2 | |
with: | |
path: .cache | |
key: ${{ github.ref }} | |
- run: pip install mkdocs-material jupyter nbconvert mkdocs-jupyter | |
- run: mkdocs gh-deploy --force |