Skip to content

Undo ai changes

Undo ai changes #213

Workflow file for this run

name: Push-to-Server
# Trigger deployment only on push to main branch
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy to cloud on main branch push
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout the files
uses: actions/checkout@v3
- name: Deploy to server
uses: appleboy/ssh-action@master
env:
TARGETDIR: app-store-dash
with:
host: ${{ secrets.HOST_DNS }}
username: ${{ vars.USERNAME }}
key: ${{ secrets.EC2_SSH_KEY }}
port: 22
envs: TARGETDIR
script_stop: true
script: |
cd $TARGETDIR
pwd
git pull origin main
cd frontend
sudo systemctl enable /home/goblin/app-store-dash/scripts/app-store-api.service
sudo systemctl enable /home/goblin/app-store-dash/scripts/app-store-frontend.service
sudo systemctl daemon-reload
sudo systemctl restart app-store-api
pwd
export PATH="/home/goblin/.nvm/versions/node/v20.16.0/bin:$PATH" && NODE_OPTIONS="--max-old-space-size=800" /home/goblin/.nvm/versions/node/v20.16.0/bin/npm run build
echo "Restart systemd service"
sudo systemctl restart app-store-frontend