원페이저, 인트로 페이지 문구수정 #156
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
name: React Deploy | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: checkout master | |
uses: actions/checkout@v3 | |
- name: cache node modules | |
uses: actions/[email protected] | |
with: | |
path: node_modules | |
key: ${{runner.OS}}-build-${{hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.OS }}-build- | |
${{ runner.OS }} | |
- name: Install Dependencies | |
run: npm install | |
#Build : ./build 디렉토리에 폴더 생성 | |
- name: Build | |
run: CI=false npm run build | |
#Deploy to server | |
- name: Deploy to Server | |
# uses: easingthemes/[email protected] | |
env: | |
# PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | |
# HOST: ${{ secrets.SERVER_HOST }} | |
# USERNAME: ${{ secrets.SERVER_USERNAME }} | |
# PORT: ${{ secrets.SERVER_PORT }} | |
# password: ${{ secrets.NPC_DEV_SERVER_PASSWORD }} | |
# PRIVATE_KEY: ${{ secrets.NCP_PRI_KEY }} | |
# HOST: ${{ secrets.NCP_HOST }} | |
# USERNAME: ${{ secrets.NCP_USR_NM }} | |
# PORT: ${{ secrets.NCP_PORT }} | |
# password: ${{ secrets.NCP_USR_PWD }} | |
PRIVATE_KEY: ${{ secrets.NCP_PRI_KEY }} | |
HOST: 10.36.68.139 | |
USERNAME: root | |
PORT: 3334 | |
PASSWORD: Y3!ui9a=La | |
run: | | |
echo "$PRIVATE_KEY" > private_key.pem | |
chmod 400 private_key.pem | |
scp -i private_key.pem -P $PORT -o StrictHostKeyChecking=no -r build/ $USERNAME@$HOST:/var/www/html/ | |
ssh -i private_key.pem -p $PORT -o StrictHostKeyChecking=no $USERNAME@$HOST 'bash -s' <<- EOF | |
rm -f private_key.pem | |