Skip to content

Merge pull request #77 from dtemkin-volpe/develop #3

Merge pull request #77 from dtemkin-volpe/develop

Merge pull request #77 from dtemkin-volpe/develop #3

name: Generate GMNS Documentation (.md)
on: [push, workflow_dispatch]
permissions:
contents: write
pull-requests: write
env:
BASE_BRANCH: main
SPEC_FOLDER: spec
SCRIPTS_FOLDER: scripts
DOCS_FOLDER: docs/spec
jobs:
update-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: technote-space/get-diff-action@v6
id: getDiff
with:
PATTERNS: |
${{env.SPEC_FOLDER}}/*
- uses: actions/setup-python@v5
if: steps.getDiff.outputs.diff || github.event_name == 'workflow_dispatch'
with:
python-version: "3.12"
- name: Install requirements
run: pip install -r ${{env.SCRIPTS_FOLDER}}/requirements.txt
if: steps.getDiff.outputs.diff || github.event_name == 'workflow_dispatch'
- name: Remove previous files
if: steps.getDiff.outputs.diff || github.event_name == 'workflow_dispatch'
run: rm ${{env.DOCS_FOLDER}}/*
- name: Run schema generator
if: steps.getDiff.outputs.diff || github.event_name == 'workflow_dispatch'
run: python ${{env.SCRIPTS_FOLDER}}/generate_docs.py
- name: Create Pull Request
id: create_pr
if: steps.getDiff.outputs.diff || github.event_name == 'workflow_dispatch'
uses: peter-evans/create-pull-request@v6
with:
commit-message: Update documentation
title: "Update Spec Documentation"
branch: autogenerated-docs
body: "Automated changes. This GitHub action is in beta."
base: ${{ github.ref_name }}
delete-branch: true