-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
4 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,27 +18,19 @@ jobs: | |
with: | ||
node-version: '20' | ||
|
||
- name: Create config directory and config.json | ||
run: | | ||
mkdir -p ./src/config | ||
echo "{\"server\": \"${{ secrets.CONFIG_SERVER }}\"}" > ./src/config/config.json | ||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Build Next.js app | ||
run: yarn build | ||
|
||
- name: Create .ssh directory | ||
run: mkdir -p ~/.ssh | ||
|
||
- name: Add SSH key | ||
run: | | ||
mkdir -p ~/.ssh | ||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/deploy_key | ||
chmod 600 ~/.ssh/deploy_key | ||
- name: Create known_hosts | ||
run: ssh-keyscan -H ${{ secrets.REMOTE_HOST }} >> ~/.ssh/known_hosts | ||
ls -la ~/.ssh | ||
cat ~/.ssh/deploy_key | head -n 5 # 키 파일의 앞 부분만 출력 | ||
- name: Deploy to server | ||
uses: easingthemes/[email protected] | ||
|
@@ -49,5 +41,5 @@ jobs: | |
TARGET: ${{ secrets.TARGET }} | ||
with: | ||
args: '-avz --delete' | ||
source: 'public/' | ||
source: '.' | ||
target: ${{ secrets.TARGET }} |