From 43d25645eea5ebdb00a6fb7b549d64d119b878ca Mon Sep 17 00:00:00 2001 From: Rolf Martin Glomsrud <54860401+polsevev@users.noreply.github.com> Date: Thu, 31 Aug 2023 15:13:18 +0200 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 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..936b55e --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,28 @@ +name: build and deploy to prod! + +on: + push: + branches: + - master +jobs: + build: + name: Build Frontend + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + - run: cd polsevev.dev.frontend + - run: npm install + - run: npm run build + - name: Rsync to server + uses: burnett01/rsync-deployments@5.2 + with: + switches: -avzr --delete + path: polsevev.dev.frontend/dist + remote_path: /home/beepsort/homepage + remote_host: ${{secrets.SERVER_IP}} + remote_user: beepsort + remote_key: ${{secrets.SSH_PRIVATE_KEY}} + remote_port: 6969