From d616c2f8cd582a325ca9f6e3df5ef5b1b4575509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Latzarus?= Date: Sat, 11 Jan 2025 06:58:14 +0100 Subject: [PATCH] build: use reusable build and deploy workflow --- .github/workflows/deploy.yml | 44 ++++++++---------------------------- 1 file changed, 9 insertions(+), 35 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d9760ce..166d8c5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,38 +6,12 @@ on: workflow_dispatch: jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Build - run: npm install && npm run build - - - name: Upload artifact - uses: actions/upload-artifact@master - with: - name: site - path: ./dist - - upload: - runs-on: ubuntu-latest - needs: build - - steps: - - name: Download artifact - uses: actions/download-artifact@master - with: - name: site - path: ./dist - - - name: Deploy with SSH - uses: easingthemes/ssh-deploy@v2.1.4 - with: - SSH_PRIVATE_KEY: ${{ secrets.BIBLYS_ORG_SSH_PRIVATE_KEY }} - REMOTE_HOST: ${{ secrets.BIBLYS_ORG_SSH_HOST }} - REMOTE_USER: ${{ secrets.BIBLYS_ORG_SSH_USER }} - SOURCE: "dist/" - TARGET: "~/docs.biblys.org" + build-and-deploy: + uses: clemlatz/build-and-deploy/.github/workflows/workflow.yml@main + with: + build-output-directory: dist + remote-target-path: ~/blog.biblys.org + secrets: + ssh-private-key: ${{ secrets.BIBLYS_ORG_SSH_PRIVATE_KEY }} + ssh-remote-host: ${{ secrets.BIBLYS_ORG_SSH_HOST }} + ssh-remote-user: ${{ secrets.BIBLYS_ORG_SSH_USER }}