-
Notifications
You must be signed in to change notification settings - Fork 41
79 lines (66 loc) · 2.57 KB
/
autodoc.yml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Sync Files to Another Repo
on:
push:
branches:
- Thyme-DocTestBranch
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout source repository
uses: actions/checkout@v4
- name: Filter and copy .md files
run: |
mkdir -p temp-dir/objects temp-dir/static
find Assets/Docs/objects -name '*.md' -exec cp {} temp-dir/objects/ \;
find Assets/Docs/static -name '*.md' -exec cp {} temp-dir/static/ \;
echo "Copied .md files to temp-dir/objects:"
ls temp-dir/objects
echo "Copied .md files to temp-dir/static:"
ls temp-dir/static
- name: Checkout target repository
uses: actions/checkout@v4
with:
repository: AoTTG-2/CustomLogicDocumentation
token: ${{ secrets.CLDOC }}
ref: integration
path: target-repo
- name: Delete existing files in target folders
run: |
rm -rf target-repo/reference/objects/*
rm -rf target-repo/reference/static/*
- name: Ensure target directories exist
run: |
mkdir -p target-repo/reference/objects
mkdir -p target-repo/reference/static
- name: Check target directories
run: |
echo "Contents of target-repo/reference/objects before copy:"
ls target-repo/reference/objects
echo "Contents of target-repo/reference/static before copy:"
ls target-repo/reference/static
- name: Copy files to target repository
run: |
cp -R temp-dir/objects/* target-repo/reference/objects/
cp -R temp-dir/static/* target-repo/reference/static/
- name: Check target directories after copy
run: |
echo "Contents of target-repo/reference/objects after copy:"
ls target-repo/reference/objects
echo "Contents of target-repo/reference/static after copy:"
ls target-repo/reference/static
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Update summary.md
run: |
python .github/workflows/updateSummary.py target-repo/SUMMARY.md target-repo/reference/objects/ target-repo/reference/static/
- name: Commit and push changes
run: |
cd target-repo
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "Sync .md files from source repo"
git push origin integration