Chenmo1212 is deploying Chenmo1212/readingBook 🚀 #6
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: FIKA Reading Deployment | |
run-name: ${{ github.actor }} is deploying ${{ github.repository }} 🚀 | |
on: [push] | |
# pull_request: | |
# branches: | |
# - main | |
# types: | |
# - closed | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Step 1 - Check_out-code 🔎 | |
uses: actions/checkout@v2 | |
- name: Step 2 - Deploy to Server 🖥️ | |
uses: easingthemes/[email protected] | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | |
ARGS: "-rltgoDzvO" | |
SOURCE: "/" | |
REMOTE_HOST: ${{ vars.REMOTE_HOST }} | |
REMOTE_USER: 'root' | |
TARGET: ${{ vars.TARGET }} | |
- name: SSH into Server and Start Flask App | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ vars.REMOTE_HOST }} | |
username: root | |
key: ${{ secrets.PRIVATE_KEY }} | |
port: 22 | |
script: | | |
# Use the lsof command to find the process occupying port 3002 | |
PID=$(lsof -t -i :3002) | |
# # If the process is found, kill it | |
# if [ -n "$PID" ]; then | |
# kill -9 $PID | |
# fi | |
# | |
# cd ${{ vars.TARGET }} | |
# npm install | |
# npm run build | |
# nohup npm start > ai_resume.log 2>&1 & |