diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..cdf184c --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,47 @@ +name: git push into another repo to deploy to vercel + +on: + push: + branches: + - "dev" + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: "18" + + - name: creates .env file + run: | + echo "${{ secrets.APPLICATION_ENV }}" | base64 --decode > .env + + - name: Create output + run: sh ./build.sh + + - name: Extract branch name + id: extract_branch + run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" + + - name: Push to another repository + id: push_directory + uses: cpina/github-action-push-to-another-repository@main + env: + API_TOKEN_GITHUB: ${{ secrets.AUTO_ACTIONS }} + with: + source-directory: "output" + destination-github-username: "urimeee" + destination-repository-name: "sohawgi_Front" + user-email: ${{ secrets.EMAIL }} + commit-message: | + ${{ github.event.commits[0].message }} / ${{ github.run_id }} + target-branch: ${{ steps.extract_branch.outputs.branch }} + create-target-branch-if-needed: true + + - name: Test get variable exported by push-to-another-repository + run: echo $DESTINATION_CLONED_DIRECTORY diff --git a/.gitignore b/.gitignore index 4d29575..e37be8a 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,8 @@ # misc .DS_Store + +.env .env.local .env.development.local .env.test.local diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..b3c4b4d --- /dev/null +++ b/build.sh @@ -0,0 +1,12 @@ +#!/bin/sh +set -e + +cd ../ +mkdir output +cp -R ./sohawgi_Front/* ./output +cp -R ./output ./sohawgi_Front/ + +cd sohawgi_Front || exit 1 + +npm install +CI=false npm run build \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index d846a4d..45cad13 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", "@types/styled-components": "^5.1.34", + "axios": "^1.7.9", "react": "^18.3.1", "react-device-detect": "^2.2.3", "react-dom": "^18.3.1", @@ -6031,6 +6032,31 @@ "node": ">=4" } }, + "node_modules/axios": { + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", + "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/axios/node_modules/form-data": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/axobject-query": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", @@ -16729,6 +16755,12 @@ "node": ">= 0.10" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" + }, "node_modules/psl": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", diff --git a/package.json b/package.json index 613e616..ea3c891 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", "@types/styled-components": "^5.1.34", + "axios": "^1.7.9", "react": "^18.3.1", "react-device-detect": "^2.2.3", "react-dom": "^18.3.1", diff --git a/public/fonts/PretendardVariable.woff2 b/public/fonts/PretendardVariable.woff2 new file mode 100644 index 0000000..a8d0637 Binary files /dev/null and b/public/fonts/PretendardVariable.woff2 differ diff --git a/public/index.html b/public/index.html index 228cda0..e7bdae2 100644 --- a/public/index.html +++ b/public/index.html @@ -1,7 +1,7 @@ - + @@ -15,7 +15,7 @@ manifest.json provides metadata used when your web app is installed on a user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ --> - +