로딩페이지 (#6) #9
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: Deploy to Server | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: execute remote ssh & deploy FE to server | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.SERVER_IP_ADDRESS }} | |
username: ${{ secrets.SSH_USERNAME}} | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
port: ${{ secrets.SSH_PORT }} | |
script: | | |
cd /home/ubuntu/pi-don-fe | |
npm run build | |
npm run start | |
run: | | |
mkdir -p ~/.ssh/ | |
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
ssh-keyscan -t rsa ${{ secrets.SERVER_IP_ADDRESS }} >> ~/.ssh/known_hosts | |