-
Notifications
You must be signed in to change notification settings - Fork 8
49 lines (42 loc) · 1.45 KB
/
Copy pathcad-tutorial-sync.yml
File metadata and controls
49 lines (42 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
# Regenerate docs/cadtutorial from the tutorial sources in AliceO2.
#
# The tutorial is written and reviewed next to the code it documents, in
# AliceO2 under Detectors/CADSupport/doc/tutorial. This job converts those
# pages into the form this site expects, so the section here never drifts
# from the converter it describes.
name: CAD tutorial
on:
schedule:
- cron: "17 4 * * 1"
workflow_dispatch:
permissions:
contents: write
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Fetch the tutorial sources
working-directory: ${{ runner.temp }}
run: |
git clone --depth 1 --filter=blob:none --sparse \
https://github.com/AliceO2Group/AliceO2.git aliceo2
cd aliceo2
git sparse-checkout set Detectors/CADSupport/doc/tutorial
- name: Regenerate the section
run: |
python3 .github/scripts/sync_cad_tutorial.py \
--source "${{ runner.temp }}/aliceo2"
- name: Commit if anything changed
run: |
if git diff --quiet -- docs/cadtutorial; then
echo "already up to date"
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email \
"41898282+github-actions[bot]@users.noreply.github.com"
git add docs/cadtutorial
git commit -m "Regenerate the CAD simulation tutorial from AliceO2"
git push