Skip to content

Commit 35453e8

Browse files
committed
trigger on push test
1 parent a0f8113 commit 35453e8

File tree

2 files changed

+34
-46
lines changed

2 files changed

+34
-46
lines changed

.github/workflows/tutorial_exporter.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,25 @@ on:
66
branches:
77
- "dev"
88
- "master"
9+
- "workflow_tut"
910
paths:
1011
- 'tutorials/**/*.ipynb'
1112

1213
jobs:
1314
# run on push
14-
export_tutorials_push:
15+
export_tutorials_on_push:
1516
if: ${{ github.event_name != 'workflow_dispatch' }}
1617
permissions: write-all
1718
runs-on: ubuntu-latest
1819
env:
1920
TUTORIAL_TIMEOUT: 1200s
2021
steps:
2122
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: files
27+
run: echo "all=$(git diff --name-only HEAD^ HEAD | xargs)" >> $GITHUB_OUTPUT
2228

2329
- name: Set up Python
2430
uses: actions/setup-python@v5
@@ -32,18 +38,15 @@ jobs:
3238
- name: Setup FFmpeg
3339
uses: FedericoCarboni/setup-ffmpeg@v2
3440

35-
- id: files
36-
uses: jitterbit/get-changed-files@v1
37-
with:
38-
token: ${{ secrets.GITHUB_TOKEN }}
39-
format: space-delimited
40-
4141
- name: Configure git
4242
run: |
4343
git config user.name "github-actions[bot]"
4444
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
4545
46-
- name: Export tutorials to .py and .html
46+
- name: Run formatter
47+
run: black tutorials/
48+
49+
- name: Export modified tutorials to .py and .html
4750
run: |
4851
set -x
4952
for file in ${{ steps.files.outputs.all }}; do
@@ -58,9 +61,6 @@ jobs:
5861
done
5962
set +x
6063
61-
- name: Run formatter
62-
run: black tutorials/
63-
6464
- uses: benjlevesque/[email protected]
6565
id: short-sha
6666

@@ -105,7 +105,10 @@ jobs:
105105
git config user.name "github-actions[bot]"
106106
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
107107
108-
- name: Export tutorials to .py and .html
108+
- name: Run formatter
109+
run: black tutorials/
110+
111+
- name: Export all tutorials to .py and .html
109112
run: |
110113
set -x
111114
# Find all .ipynb files in the tutorials directory
@@ -119,9 +122,6 @@ jobs:
119122
done
120123
set +x
121124
122-
- name: Run formatter
123-
run: black tutorials/
124-
125125
- uses: benjlevesque/[email protected]
126126
id: short-sha
127127

0 commit comments

Comments
 (0)