name: CI

on:
  push:
    branches: [ main ]
jobs:
  job_one:
    name: Deploy
    runs-on: ubuntu-latest

    steps:
      - name: Run a one-line script
        uses: appleboy/ssh-action@master
        with:
          host: ${{secrets.HOST}}
          port: 22
          username: root
          key: ${{secrets.PRIVATE_KEY}}
          script: |
            cd /var/www/html/store-admin
            git pull origin main
            export NODE_OPTIONS="--max-old-space-size=8192"
            ng build
