Skip to content

Commit

Permalink
Create convert.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronBrennan1 authored Jan 23, 2024
1 parent 7ee9a3d commit 61df1c8
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/convert.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: MATLAB MLX to HTML Conversion

# Trigger the workflow on push events but only for the main branch
on:
push:
branches:
- gh-pages
paths:
- '**.mlx'

# The jobs key is a collection of the jobs to run
jobs:
convert-mlx-to-html:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set up MATLAB environment
uses: matlab-actions/setup-matlab@v1

- name: Find MLX Files
id: find-mlx
run: |
mlx_files=$(find . -type f -name '*.mlx')
echo "::set-output name=mlx_files::$mlx_files"
- name: Convert MLX to HTML
if: steps.find-mlx.outputs.mlx_files != ''
run: |
./run_matlab.sh "${{ steps.find-mlx.outputs.mlx_files }}"

0 comments on commit 61df1c8

Please sign in to comment.