From b48c6e85ab8030da1d7619e18a64604a2f2536be Mon Sep 17 00:00:00 2001 From: LOGI <18008498+vcheckzen@users.noreply.github.com> Date: Fri, 20 Sep 2024 03:36:44 +0800 Subject: [PATCH] Create update-front-end-repo.yml --- .github/workflows/update-front-end-repo.yml | 35 +++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/update-front-end-repo.yml diff --git a/.github/workflows/update-front-end-repo.yml b/.github/workflows/update-front-end-repo.yml new file mode 100644 index 00000000..46b6dee9 --- /dev/null +++ b/.github/workflows/update-front-end-repo.yml @@ -0,0 +1,35 @@ +name: Update Front End Repository + +on: + workflow_dispatch: + +jobs: + update: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + path: fodi + + - name: Checkout front-end repo + uses: actions/checkout@v4 + with: + repository: vcheckzen/FODI-FRONT-END + token: ${{ secrets.PAT }} + path: fodi-front-end + + - name: Push + run: | + cd fodi-front-end || exit 1 + + if ! diff -q ../fodi/front-end/index.html index.html; then + cp ../fodi/front-end/index.html index.html + + git config user.name github-actions + git config user.email github-actions@github.com + git add . + git commit -m "sync with main repo" + git push + fi