From 3b74a0acd211a41fdb9cf4faec91d8d8e677d476 Mon Sep 17 00:00:00 2001 From: autumnly1007 Date: Sat, 20 Jan 2024 16:20:52 +0900 Subject: [PATCH] =?UTF-8?q?[Feat]=20#2=20vercel=20=EB=B0=B0=ED=8F=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 30 ++++++++++++++++++++++++++++++ build.sh | 5 +++++ 2 files changed, 35 insertions(+) create mode 100644 .github/workflows/main.yml create mode 100644 build.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..6ed5228 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,30 @@ +name: git push into another repo to deploy to vercel + +on: + push: + branches: [main] + +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.AUTO_WOODADA_FE }} + with: + source-directory: 'output' + destination-github-username: autumnly1007 + destination-repository-name: woodada-fe + user-email: ${{ secrets.OFFICIAL_ACCOUNT_EMAIL }} + commit-message: ${{ github.event.commits[0].message }} + target-branch: main + - name: Test get variable exported by push-to-another-repository + run: echo $DESTINATION_CLONED_DIRECTORY diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..58e107c --- /dev/null +++ b/build.sh @@ -0,0 +1,5 @@ +#!/bin/sh +cd ../ +mkdir output +cp -R ./woodada-fe/* ./output +cp -R ./output ./woodada-fe/ \ No newline at end of file