-
Notifications
You must be signed in to change notification settings - Fork 3
163 lines (144 loc) · 4.94 KB
/
update-cs-website.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
name: update-cs-website
env:
API_TOKEN_GITHUB: ${{ secrets.CS_SYNC_TOKEN }}
DESTINATION_REPO: 'csfbk/csfbk.github.io'
USER_NAME: 'csfbk'
USER_EMAIL: '[email protected]'
UNIT_ACRONYM: 'aleph'
on:
push:
paths:
- '_data/destinations.yml'
- '_data/members.yml'
- '_data/people.yml'
- '_data/publications.yml'
- '_data/theses.yml'
- 'assets/areas/people/**'
jobs:
check-changes:
runs-on: ubuntu-latest
outputs:
destinations: ${{ steps.changes.outputs.destinations }}
members: ${{ steps.changes.outputs.members }}
people: ${{ steps.changes.outputs.people }}
people-pictures: ${{ steps.changes.outputs.people-pictures }}
publications: ${{ steps.changes.outputs.publications }}
theses: ${{ steps.changes.outputs.theses }}
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
destinations:
- '_data/destinations.yml'
members:
- '_data/members.yml'
people:
- '_data/people.yml'
people-pictures:
- 'assets/areas/people/**'
publications:
- '_data/publications.yml'
theses:
- '_data/theses.yml'
update-destinations:
runs-on: ubuntu-latest
needs: check-changes
if: ${{ needs.check-changes.outputs.destinations == 'true' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Push destinations to CS repository
uses: dmnemec/copy_file_to_another_repo_action@main
with:
source_file: '_data/destinations.yml'
destination_repo: ${{ env.DESTINATION_REPO }}
destination_folder: '_data/destinations'
rename: 'destinations_${{ env.UNIT_ACRONYM }}.yml'
user_name: ${{ env.USER_NAME }}
user_email: ${{ env.USER_EMAIL }}
- run: echo "Operation completed."
update-members:
runs-on: ubuntu-latest
needs: update-destinations
if: ${{ needs.check-changes.outputs.members == 'true' && always()}}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Push data to CS repository
uses: dmnemec/copy_file_to_another_repo_action@main
with:
source_file: '_data/members.yml'
destination_repo: ${{ env.DESTINATION_REPO }}
destination_folder: '_data/members'
rename: 'members_${{ env.UNIT_ACRONYM }}.yml'
user_name: ${{ env.USER_NAME }}
user_email: ${{ env.USER_EMAIL }}
update-people:
runs-on: ubuntu-latest
needs: update-members
if: ${{ needs.check-changes.outputs.people == 'true' && always()}}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Push data to CS repository
uses: dmnemec/copy_file_to_another_repo_action@main
with:
source_file: '_data/people.yml'
destination_repo: ${{ env.DESTINATION_REPO }}
destination_folder: '_data/people'
rename: '1_people_${{ env.UNIT_ACRONYM }}.yml'
user_name: ${{ env.USER_NAME }}
user_email: ${{ env.USER_EMAIL }}
- run: echo "Operation completed."
update-people-pictures:
runs-on: ubuntu-latest
needs: update-people
if: ${{ needs.check-changes.outputs.people-pictures == 'true' && always()}}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Push data to CS repository
uses: dmnemec/copy_file_to_another_repo_action@main
with:
source_file: 'assets/areas/people/'
destination_repo: ${{ env.DESTINATION_REPO }}
destination_folder: 'assets/areas/people/${{ env.UNIT_ACRONYM }}'
user_name: ${{ env.USER_NAME }}
user_email: ${{ env.USER_EMAIL }}
use_rsync: true
- run: echo "Operation completed."
update-publications:
runs-on: ubuntu-latest
needs: update-people-pictures
if: ${{ needs.check-changes.outputs.publications == 'true' && always()}}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Push data to CS repository
uses: dmnemec/copy_file_to_another_repo_action@main
with:
source_file: '_data/publications.yml'
destination_repo: ${{ env.DESTINATION_REPO }}
destination_folder: '_data/publications'
rename: 'publications_${{ env.UNIT_ACRONYM }}.yml'
user_name: ${{ env.USER_NAME }}
user_email: ${{ env.USER_EMAIL }}
update-theses:
runs-on: ubuntu-latest
needs: update-publications
if: ${{ needs.check-changes.outputs.theses == 'true' && always()}}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Push data to CS repository
uses: dmnemec/copy_file_to_another_repo_action@main
with:
source_file: '_data/theses.yml'
destination_repo: ${{ env.DESTINATION_REPO }}
destination_folder: '_data/theses'
rename: 'theses_${{ env.UNIT_ACRONYM }}.yml'
user_name: ${{ env.USER_NAME }}
user_email: ${{ env.USER_EMAIL }}