From 5c24f658254c6e2abd1205ee5c7244077cf65c14 Mon Sep 17 00:00:00 2001 From: team return <161801587+teamreturn@users.noreply.github.com> Date: Fri, 5 Jul 2024 08:51:32 +0900 Subject: [PATCH 01/15] =?UTF-8?q?feat=20::=20build.sh=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 build.sh diff --git a/build.sh b/build.sh new file mode 100644 index 00000000..bb1bdd68 --- /dev/null +++ b/build.sh @@ -0,0 +1,5 @@ +#!/bin/sh +cd ../ +mkdir output +cp -R ./JOBIS-FE/* ./output +cp -R ./output ./JOBIS-FE/ From d55fcc5c5afdc9a91388486b3a3a70e292a75135 Mon Sep 17 00:00:00 2001 From: team return <161801587+teamreturn@users.noreply.github.com> Date: Fri, 5 Jul 2024 09:06:14 +0900 Subject: [PATCH 02/15] feat :: git-push.yml --- .github/workflows/git-push.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/git-push.yml diff --git a/.github/workflows/git-push.yml b/.github/workflows/git-push.yml new file mode 100644 index 00000000..94a40a26 --- /dev/null +++ b/.github/workflows/git-push.yml @@ -0,0 +1,29 @@ +name: git push into another repo to deploy to vercel + +on: + push: + +jobs: + build: + runs-on: ubuntu-latest + container: pandoc/latex + steps: + - uses: actions/checkout@v2 + - name: Install mustache (to update the date) + run: apk add ruby && gem install mustache + - name: creates output + run: sh ./build.sh + - name: Pushes to another repository + id: push_directory + uses: cpina/github-action-push-to-another-repository@main + env: + API_TOKEN_GITHUB: ${{ secrets.JOBIS_GITHUB_KEY }} + with: + source-directory: 'output' + destination-github-username: teamreturn + destination-repository-name: JOBIS-FE + user-email: ${{ secrets.RETURN_ACCOUNT_EMAIL }} + commit-message: ${{ github.event.commits[0].message }} + target-branch: ${{ github.ref_name }} + - name: Test get variable exported by push-to-another-repository + run: echo $DESTINATION_CLONED_DIRECTORY From 6b4a0b47f90c9f7f3f493437e3364afb1ed91623 Mon Sep 17 00:00:00 2001 From: team return <161801587+teamreturn@users.noreply.github.com> Date: Fri, 5 Jul 2024 09:11:10 +0900 Subject: [PATCH 03/15] fix :: git-push.yml --- .github/workflows/git-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/git-push.yml b/.github/workflows/git-push.yml index 94a40a26..945c1bd6 100644 --- a/.github/workflows/git-push.yml +++ b/.github/workflows/git-push.yml @@ -17,7 +17,7 @@ jobs: id: push_directory uses: cpina/github-action-push-to-another-repository@main env: - API_TOKEN_GITHUB: ${{ secrets.JOBIS_GITHUB_KEY }} + API_TOKEN_GITHUB: ${{ secrets.JOBIS_GITHUB_TOKEN }} with: source-directory: 'output' destination-github-username: teamreturn From 68ed78f531e3e2ba73f5a8ba0a0fa9b5220ba5d6 Mon Sep 17 00:00:00 2001 From: jikwan0327 <102665117+jikwan0327@users.noreply.github.com> Date: Fri, 5 Jul 2024 11:22:36 +0900 Subject: [PATCH 04/15] =?UTF-8?q?chore=20::=20output=20=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=20=ED=99=95=EC=9D=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/git-push.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/git-push.yml b/.github/workflows/git-push.yml index 945c1bd6..1b734ff8 100644 --- a/.github/workflows/git-push.yml +++ b/.github/workflows/git-push.yml @@ -13,6 +13,8 @@ jobs: run: apk add ruby && gem install mustache - name: creates output run: sh ./build.sh + - name: Check files after build + run: ls -al ./output - name: Pushes to another repository id: push_directory uses: cpina/github-action-push-to-another-repository@main From 908336f7e532124b0a3c678cad0742f0932965f7 Mon Sep 17 00:00:00 2001 From: jikwan0327 <102665117+jikwan0327@users.noreply.github.com> Date: Fri, 5 Jul 2024 11:26:20 +0900 Subject: [PATCH 05/15] =?UTF-8?q?chore=20::=20git-push.yml=20build=20?= =?UTF-8?q?=EC=A0=84=20=EB=A1=9C=EA=B7=B8=20=ED=99=95=EC=9D=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/git-push.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/git-push.yml b/.github/workflows/git-push.yml index 1b734ff8..d3aaead0 100644 --- a/.github/workflows/git-push.yml +++ b/.github/workflows/git-push.yml @@ -11,6 +11,8 @@ jobs: - uses: actions/checkout@v2 - name: Install mustache (to update the date) run: apk add ruby && gem install mustache + - name: Check files before build + run: ls -al - name: creates output run: sh ./build.sh - name: Check files after build From 120bf1c4d3b5510637849aba1d31fc4e1141915e Mon Sep 17 00:00:00 2001 From: jikwan0327 <102665117+jikwan0327@users.noreply.github.com> Date: Fri, 5 Jul 2024 11:30:14 +0900 Subject: [PATCH 06/15] =?UTF-8?q?chore=20::=20build.sh=20=EC=88=A8?= =?UTF-8?q?=EA=B9=80=20=ED=8C=8C=EC=9D=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index bb1bdd68..c37e4ad0 100644 --- a/build.sh +++ b/build.sh @@ -1,5 +1,5 @@ #!/bin/sh cd ../ mkdir output -cp -R ./JOBIS-FE/* ./output +cp -R ./JOBIS-FE/. ./output cp -R ./output ./JOBIS-FE/ From 6ca8e2987dd7486991e892e7042e3e6ce82a1983 Mon Sep 17 00:00:00 2001 From: jikwan0327 <102665117+jikwan0327@users.noreply.github.com> Date: Fri, 5 Jul 2024 11:46:13 +0900 Subject: [PATCH 07/15] fix :: ignore .github --- build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.sh b/build.sh index c37e4ad0..40bf1695 100644 --- a/build.sh +++ b/build.sh @@ -3,3 +3,5 @@ cd ../ mkdir output cp -R ./JOBIS-FE/. ./output cp -R ./output ./JOBIS-FE/ +cd ./output/JOBIS-FE +rm -r .github From 69c6c00c5dd275713c5fe5b6776ee01a2f4ebc7f Mon Sep 17 00:00:00 2001 From: jikwan0327 <102665117+jikwan0327@users.noreply.github.com> Date: Fri, 5 Jul 2024 11:48:12 +0900 Subject: [PATCH 08/15] =?UTF-8?q?chore=20::=20build.sh=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=20=ED=99=95=EC=9D=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build.sh b/build.sh index 40bf1695..cb6d4f7b 100644 --- a/build.sh +++ b/build.sh @@ -4,4 +4,5 @@ mkdir output cp -R ./JOBIS-FE/. ./output cp -R ./output ./JOBIS-FE/ cd ./output/JOBIS-FE +ls -al rm -r .github From fff9ac48a18b650b21296aaba0e3dad4a14f4a7e Mon Sep 17 00:00:00 2001 From: jikwan0327 <102665117+jikwan0327@users.noreply.github.com> Date: Fri, 5 Jul 2024 11:49:59 +0900 Subject: [PATCH 09/15] =?UTF-8?q?chore=20::=20build.sh=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=20=ED=99=95=EC=9D=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index cb6d4f7b..43a4000f 100644 --- a/build.sh +++ b/build.sh @@ -3,6 +3,6 @@ cd ../ mkdir output cp -R ./JOBIS-FE/. ./output cp -R ./output ./JOBIS-FE/ -cd ./output/JOBIS-FE +cd ./output ls -al rm -r .github From b59995823e53809c08b11b95c8012fa7f72535cd Mon Sep 17 00:00:00 2001 From: jikwan0327 <102665117+jikwan0327@users.noreply.github.com> Date: Fri, 5 Jul 2024 11:54:47 +0900 Subject: [PATCH 10/15] =?UTF-8?q?chore=20::=20build.sh=20.github=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 43a4000f..696c6fdb 100644 --- a/build.sh +++ b/build.sh @@ -5,4 +5,5 @@ cp -R ./JOBIS-FE/. ./output cp -R ./output ./JOBIS-FE/ cd ./output ls -al -rm -r .github +rm -rf .github +ls -al From f42decd3fa746e4780611ed80aac40b3f123b0a3 Mon Sep 17 00:00:00 2001 From: jikwan0327 <102665117+jikwan0327@users.noreply.github.com> Date: Fri, 5 Jul 2024 11:59:18 +0900 Subject: [PATCH 11/15] =?UTF-8?q?fix=20::=20git-push.yml=20target=20branch?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/git-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/git-push.yml b/.github/workflows/git-push.yml index d3aaead0..97be51a0 100644 --- a/.github/workflows/git-push.yml +++ b/.github/workflows/git-push.yml @@ -28,6 +28,6 @@ jobs: destination-repository-name: JOBIS-FE user-email: ${{ secrets.RETURN_ACCOUNT_EMAIL }} commit-message: ${{ github.event.commits[0].message }} - target-branch: ${{ github.ref_name }} + target-branch: develop - name: Test get variable exported by push-to-another-repository run: echo $DESTINATION_CLONED_DIRECTORY From 86765569521d0f29fd33560e84a0f7d3c8902d75 Mon Sep 17 00:00:00 2001 From: team return <161801587+teamreturn@users.noreply.github.com> Date: Fri, 5 Jul 2024 12:05:14 +0900 Subject: [PATCH 12/15] chore :: git-push.yml target branch --- .github/workflows/git-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/git-push.yml b/.github/workflows/git-push.yml index 97be51a0..d3aaead0 100644 --- a/.github/workflows/git-push.yml +++ b/.github/workflows/git-push.yml @@ -28,6 +28,6 @@ jobs: destination-repository-name: JOBIS-FE user-email: ${{ secrets.RETURN_ACCOUNT_EMAIL }} commit-message: ${{ github.event.commits[0].message }} - target-branch: develop + target-branch: ${{ github.ref_name }} - name: Test get variable exported by push-to-another-repository run: echo $DESTINATION_CLONED_DIRECTORY From 49d9f93e7539a103bfc081ee1d4997583835a92d Mon Sep 17 00:00:00 2001 From: jikwan Date: Fri, 5 Jul 2024 12:23:15 +0900 Subject: [PATCH 13/15] chore :: github action rm .github --- .github/workflows/git-push.yml | 5 +++++ build.sh | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/git-push.yml b/.github/workflows/git-push.yml index d3aaead0..32898267 100644 --- a/.github/workflows/git-push.yml +++ b/.github/workflows/git-push.yml @@ -17,6 +17,11 @@ jobs: run: sh ./build.sh - name: Check files after build run: ls -al ./output + - name: Delete .github directory + run: | + cd ./output + rm -rf .github + ls -al - name: Pushes to another repository id: push_directory uses: cpina/github-action-push-to-another-repository@main diff --git a/build.sh b/build.sh index 696c6fdb..0b960c3b 100644 --- a/build.sh +++ b/build.sh @@ -3,7 +3,4 @@ cd ../ mkdir output cp -R ./JOBIS-FE/. ./output cp -R ./output ./JOBIS-FE/ -cd ./output -ls -al -rm -rf .github -ls -al + From 78919a869ad986a4dbd4ee126b45828767e26590 Mon Sep 17 00:00:00 2001 From: jikwan Date: Fri, 5 Jul 2024 13:49:18 +0900 Subject: [PATCH 14/15] =?UTF-8?q?feat=20::=20git-pr.yml=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/git-pr.yml | 36 ++++++++++++++++++++++++++++++++++ .github/workflows/git-push.yml | 8 +++----- 2 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/git-pr.yml diff --git a/.github/workflows/git-pr.yml b/.github/workflows/git-pr.yml new file mode 100644 index 00000000..6f80f2c0 --- /dev/null +++ b/.github/workflows/git-pr.yml @@ -0,0 +1,36 @@ +name: git pull_request into another repo to deploy to vercel + +on: + pull_request: + branches: + - main + - develop + +jobs: + build: + runs-on: ubuntu-latest + container: pandoc/latex + steps: + - uses: actions/checkout@v2 + - name: Install mustache (to update the date) + run: apk add ruby && gem install mustache + - name: creates output + run: sh ./build.sh + - name: Delete .github directory + run: | + cd ./output + rm -rf .github + - name: Pushes to another repository + id: push_directory + uses: cpina/github-action-push-to-another-repository@main + env: + API_TOKEN_GITHUB: ${{ secrets.JOBIS_GITHUB_TOKEN }} + with: + source-directory: 'output' + destination-github-username: teamreturn + destination-repository-name: JOBIS-FE + user-email: ${{ secrets.RETURN_ACCOUNT_EMAIL }} + commit-message: ${{ github.event.commits[0].message }} + target-branch: ${{ github.base_ref }} + - name: Test get variable exported by push-to-another-repository + run: echo $DESTINATION_CLONED_DIRECTORY diff --git a/.github/workflows/git-push.yml b/.github/workflows/git-push.yml index 32898267..66719e6b 100644 --- a/.github/workflows/git-push.yml +++ b/.github/workflows/git-push.yml @@ -2,6 +2,9 @@ name: git push into another repo to deploy to vercel on: push: + branches: + - main + - develop jobs: build: @@ -11,17 +14,12 @@ jobs: - uses: actions/checkout@v2 - name: Install mustache (to update the date) run: apk add ruby && gem install mustache - - name: Check files before build - run: ls -al - name: creates output run: sh ./build.sh - - name: Check files after build - run: ls -al ./output - name: Delete .github directory run: | cd ./output rm -rf .github - ls -al - name: Pushes to another repository id: push_directory uses: cpina/github-action-push-to-another-repository@main From 632f6c5dcf0172e27a614e67db61859baf1653cf Mon Sep 17 00:00:00 2001 From: jikwan Date: Fri, 5 Jul 2024 13:56:19 +0900 Subject: [PATCH 15/15] fix :: pr action if merged --- .github/workflows/git-pr.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/git-pr.yml b/.github/workflows/git-pr.yml index 6f80f2c0..02f2d16c 100644 --- a/.github/workflows/git-pr.yml +++ b/.github/workflows/git-pr.yml @@ -7,7 +7,8 @@ on: - develop jobs: - build: + if_merged: + if: github.event.pull_request.merged == true runs-on: ubuntu-latest container: pandoc/latex steps: