Skip to content

API: add delete Build endpoint #59

API: add delete Build endpoint

API: add delete Build endpoint #59

Workflow file for this run

# Github action for connecting to digitalocean server and run the deploy script
name: Deploy
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Connect to DigitalOcean Droplet
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
script: |
set -x
# kill the previous server
kill -9 $(cat ~/pc-components/api-server/server_pid.txt)
kill -9 $(cat ~/pc-components/web-app/server_pid.txt)
set -e
cd ~
rm -rf ./pc-components
git clone https://github.com/Pansysk75/pc-components.git
cd ~/pc-components/api-server
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
export DATABASE_URI=${{ secrets.DATABASE_URI }}
python3 run.py &> server_log.txt &
echo $! > server_pid.txt
cd ~/pc-components/web-app
npm install
node server.js &> server_log.txt &
echo $! > server_pid.txt