Skip to content

Commit 61df1c8

Browse files
Create convert.yml
1 parent 7ee9a3d commit 61df1c8

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/convert.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: MATLAB MLX to HTML Conversion
2+
3+
# Trigger the workflow on push events but only for the main branch
4+
on:
5+
push:
6+
branches:
7+
- gh-pages
8+
paths:
9+
- '**.mlx'
10+
11+
# The jobs key is a collection of the jobs to run
12+
jobs:
13+
convert-mlx-to-html:
14+
# The type of runner that the job will run on
15+
runs-on: ubuntu-latest
16+
17+
# Steps represent a sequence of tasks that will be executed as part of the job
18+
steps:
19+
- name: Checkout Repository
20+
uses: actions/checkout@v2
21+
22+
- name: Set up MATLAB environment
23+
uses: matlab-actions/setup-matlab@v1
24+
25+
- name: Find MLX Files
26+
id: find-mlx
27+
run: |
28+
mlx_files=$(find . -type f -name '*.mlx')
29+
echo "::set-output name=mlx_files::$mlx_files"
30+
31+
- name: Convert MLX to HTML
32+
if: steps.find-mlx.outputs.mlx_files != ''
33+
run: |
34+
./run_matlab.sh "${{ steps.find-mlx.outputs.mlx_files }}"

0 commit comments

Comments
 (0)