From f29dfeea5a663d80638e3d0ed8a21841f9ace0a7 Mon Sep 17 00:00:00 2001 From: Andras Nemeseri Date: Sun, 24 Mar 2024 20:33:38 -0700 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..661e23f --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,31 @@ +name: Deploy + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - name: Copy repository contents via scp + uses: appleboy/scp-action@master + env: + HOST: ${{ secrets.HOST }} + USERNAME: ${{ secrets.USERNAME }} + PORT: ${{ secrets.PORT }} + KEY: ${{ secrets.SSHKEY }} + with: + source: "." + target: "/www/family-site-reactjs" + + - name: Executing remote command + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.HOST }} + USERNAME: ${{ secrets.USERNAME }} + PORT: ${{ secrets.PORT }} + KEY: ${{ secrets.SSHKEY }} + script: npm install && npm build