From 83fe11c2b1164b1f7f46b4fd84628532aa4c3bb9 Mon Sep 17 00:00:00 2001 From: Marco Pernpruner Date: Thu, 26 Sep 2024 13:56:35 +0200 Subject: [PATCH] Try with unique workflow --- .github/workflows/update-cs-website.yml | 159 ++++++++++++++++++ .github/workflows/update-destinations-cs.yml | 5 - .github/workflows/update-members-cs.yml | 5 - .github/workflows/update-people-cs.yml | 5 - .../workflows/update-people-pictures-cs.yml | 5 - .github/workflows/update-publications-cs.yml | 5 - .github/workflows/update-theses-cs.yml | 5 - 7 files changed, 159 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/update-cs-website.yml diff --git a/.github/workflows/update-cs-website.yml b/.github/workflows/update-cs-website.yml new file mode 100644 index 0000000..f1dc8b8 --- /dev/null +++ b/.github/workflows/update-cs-website.yml @@ -0,0 +1,159 @@ +name: update-cs-website + +env: + API_TOKEN_GITHUB: ${{ secrets.CS_SYNC_TOKEN }} + +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: 'csfbk/csfbk.github.io' + destination_folder: '_data/destinations' + rename: 'destinations_st.yml' + user_name: 'csfbk' + user_email: 'cs@fbk.eu' + + - run: echo "Operation completed." + + update-members: + runs-on: ubuntu-latest + needs: update-destinations + if: ${{ needs.check-changes.outputs.members == 'true' }} + 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: 'csfbk/csfbk.github.io' + destination_folder: '_data/members' + rename: 'members_st.yml' + user_name: 'csfbk' + user_email: 'cs@fbk.eu' + + update-people: + runs-on: ubuntu-latest + needs: update-members + if: ${{ needs.check-changes.outputs.people == 'true' }} + 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: 'csfbk/csfbk.github.io' + destination_folder: '_data/people' + rename: '1_people_st.yml' + user_name: 'csfbk' + user_email: 'cs@fbk.eu' + + - run: echo "Operation completed." + + update-people-pictures: + runs-on: ubuntu-latest + needs: update-people + if: ${{ needs.check-changes.outputs.people-pictures == 'true' }} + 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: 'csfbk/csfbk.github.io' + destination_folder: 'assets/areas/people/st' + user_name: 'csfbk' + user_email: 'cs@fbk.eu' + use_rsync: true + + - run: echo "Operation completed." + + update-publications: + runs-on: ubuntu-latest + needs: update-people-pictures + if: ${{ needs.check-changes.outputs.publications == 'true' }} + 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: 'csfbk/csfbk.github.io' + destination_folder: '_data/publications' + rename: 'publications_st.yml' + user_name: 'csfbk' + user_email: 'cs@fbk.eu' + + update-theses: + runs-on: ubuntu-latest + needs: update-publications + if: ${{ needs.check-changes.outputs.theses == 'true' }} + 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: 'csfbk/csfbk.github.io' + destination_folder: '_data/theses' + rename: 'theses_st.yml' + user_name: 'csfbk' + user_email: 'cs@fbk.eu' \ No newline at end of file diff --git a/.github/workflows/update-destinations-cs.yml b/.github/workflows/update-destinations-cs.yml index 4084e4b..2c0165c 100644 --- a/.github/workflows/update-destinations-cs.yml +++ b/.github/workflows/update-destinations-cs.yml @@ -1,10 +1,5 @@ name: update-destinations-cs -on: - push: - paths: - - '_data/destinations.yml' - jobs: copy-file: runs-on: ubuntu-latest diff --git a/.github/workflows/update-members-cs.yml b/.github/workflows/update-members-cs.yml index e1b31bd..fbbdc66 100644 --- a/.github/workflows/update-members-cs.yml +++ b/.github/workflows/update-members-cs.yml @@ -1,10 +1,5 @@ name: update-members-cs -on: - push: - paths: - - '_data/members.yml' - jobs: copy-file: runs-on: ubuntu-latest diff --git a/.github/workflows/update-people-cs.yml b/.github/workflows/update-people-cs.yml index f5b7b3a..08fe765 100644 --- a/.github/workflows/update-people-cs.yml +++ b/.github/workflows/update-people-cs.yml @@ -1,10 +1,5 @@ name: update-people-cs -on: - push: - paths: - - '_data/people.yml' - jobs: copy-file: runs-on: ubuntu-latest diff --git a/.github/workflows/update-people-pictures-cs.yml b/.github/workflows/update-people-pictures-cs.yml index 5a3d890..ed0a778 100644 --- a/.github/workflows/update-people-pictures-cs.yml +++ b/.github/workflows/update-people-pictures-cs.yml @@ -1,10 +1,5 @@ name: update-people-pictures-cs -on: - push: - paths: - - 'assets/areas/people/**' - jobs: copy-file: runs-on: ubuntu-latest diff --git a/.github/workflows/update-publications-cs.yml b/.github/workflows/update-publications-cs.yml index 5398533..86de55f 100644 --- a/.github/workflows/update-publications-cs.yml +++ b/.github/workflows/update-publications-cs.yml @@ -1,10 +1,5 @@ name: update-publications-cs -on: - push: - paths: - - '_data/publications.yml' - jobs: copy-file: runs-on: ubuntu-latest diff --git a/.github/workflows/update-theses-cs.yml b/.github/workflows/update-theses-cs.yml index 0533496..b44e19f 100644 --- a/.github/workflows/update-theses-cs.yml +++ b/.github/workflows/update-theses-cs.yml @@ -1,10 +1,5 @@ name: update-theses-cs -on: - push: - paths: - - '_data/theses.yml' - jobs: copy-file: runs-on: ubuntu-latest