Skip to content

Commit

Permalink
Fix docs/ops to docs/src/ops
Browse files Browse the repository at this point in the history
  • Loading branch information
ddilbazTT committed Jan 29, 2025
1 parent 4b75127 commit 7b0fd8b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/generate-ttnn-md.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
branches:
- ddilbaz/pages-workflow
paths:
- 'docs/ops/ttnn/**'
- 'docs/src/ops/ttnn/**'

jobs:
generate_md:
Expand Down Expand Up @@ -51,27 +51,27 @@ jobs:
shell: bash
run: |
# Check if any files exist before removing
if git ls-files docs/ops/ttnn/*.md docs/ops/ttnn/*.json; then
if git ls-files docs/src/ops/ttnn/*.md docs/src/ops/ttnn/*.json; then
# Remove existing files from git tracking
git rm -f docs/ops/ttnn/ttnn*.md docs/ops/ttnn/*.json
git rm -f docs/src/ops/ttnn/ttnn*.md docs/src/ops/ttnn/*.json
git commit -m "Remove old TTNN MD/JSON files before regeneration"
fi
- name: Create necessary directories
shell: bash
run: |
mkdir -p ${{ steps.strings.outputs.work-dir }}/docs/ops/ttnn
mkdir -p ${{ steps.strings.outputs.work-dir }}/docs/src/ops/ttnn
- name: Generate TTNN MD Files and Commit if Changes Exist
shell: bash
run: |
source env/activate
python ${{ steps.strings.outputs.work-dir }}/tt_torch/tools/generate_md.py --excel_path ${{ steps.strings.outputs.work-dir }}/results/models_op_per_op.xlsx --md_dir docs/ops/ttnn --json_dir docs/ops/ttnn
python ${{ steps.strings.outputs.work-dir }}/tt_torch/tools/generate_md.py --excel_path ${{ steps.strings.outputs.work-dir }}/results/models_op_per_op.xlsx --md_dir docs/src/ops/ttnn --json_dir docs/src/ops/ttnn
# List newly generated files
NEW_FILES=(docs/ops/ttnn/ttnn*.md docs/ops/ttnn/ttnn*.json)
NEW_FILES=(docs/src/ops/ttnn/ttnn*.md docs/src/ops/ttnn/ttnn*.json)
# Remove files not in the new generation
git rm $(git ls-files 'docs/ops/ttnn/ttnn*.md' 'docs/ops/ttnn/ttnn*.json' | \
git rm $(git ls-files 'docs/src/ops/ttnn/ttnn*.md' 'docs/src/ops/ttnn/ttnn*.json' | \
grep -vFf <(printf '%s\n' "${NEW_FILES[@]}"))
# Stage new and modified files
Expand All @@ -87,4 +87,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: ttnn-md
path: ${{ steps.strings.outputs.work-dir }}/docs/ops/ttnn
path: ${{ steps.strings.outputs.work-dir }}/docs/src/ops/ttnn

0 comments on commit 7b0fd8b

Please sign in to comment.