Skip to content

Commit

Permalink
Merge pull request #50 from Beside-Potenday/seungbeom
Browse files Browse the repository at this point in the history
�build: github action 추가
  • Loading branch information
seung365 authored Aug 2, 2024
2 parents 05e2f1e + dd5f7ca commit a7a2b8a
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 8 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/git-push.yml
Original file line number Diff line number Diff line change
@@ -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_KEY }}
with:
source-directory: 'output'
destination-github-username: 'seung365'
destination-repository-name: 'alphamail-frontend '
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
5 changes: 5 additions & 0 deletions build.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
cd ../
mkdir output
cp -R ./alphamail-frontend/* ./output
cp -R ./output ./alphamail-frontend/
12 changes: 4 additions & 8 deletions src/components/Mail/MailModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,12 @@ export const MailModal = ({ isOpen, onClose }: MailModalProps) => {
};

const handleKeyDown = async (event: React.KeyboardEvent<HTMLInputElement>) => {
if (event.key === 'Enter') {
if (event.key === 'Enter' && content) {
event.preventDefault();
const inputValue = (event.target as HTMLInputElement).value;

if (currentIndex === 0) {
const combinedValue = `${firstInput} ${inputValue}`.trim();
await setValue(inputNames[currentIndex], combinedValue, { shouldValidate: true });
console.log(combinedValue);
}

const combinedValue = `${firstInput} ${inputValue}`.trim();
await setValue(inputNames[currentIndex], combinedValue, { shouldValidate: true });
console.log(combinedValue);
await handleNextClick();
}
};
Expand Down

0 comments on commit a7a2b8a

Please sign in to comment.