π fix: remove monitor #109
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: CI | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup Nodejs | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: npm install | |
- name: Build | |
run: npm run build | |
- name: Deploy via SCP | |
uses: appleboy/scp-action@v0.1.6 | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USER }} | |
port: ${{ secrets.SSH_PORT }} | |
key: ${{ secrets.SSH_KEY }} | |
timeout: 120s | |
source: "., !node_modules" | |
target: "~/shipment-service" | |
- name: multiple command | |
uses: appleboy/ssh-action@v1.0.1 | |
env: | |
ENV_FILE: ${{ secrets.APP_ENV_FILE }} | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USER }} | |
port: ${{ secrets.SSH_PORT }} | |
key: ${{ secrets.SSH_KEY }} | |
envs: ENV_FILE | |
script: | | |
export PATH="$PATH:/home/ubuntu/.nvm/versions/node/v20.10.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" | |
cd ~/shipment-service | |
npm install | |
env_file_string=$(echo $ENV_FILE) | |
echo $env_file_string | tr ' ' '\n' | sed 's/\([^=]\+\)=\([^ ]\+\)/\1=\2/' > ~/shipment-service/.env | |
sudo docker compose up -d | |
pm2 restart server |