From 10c52419ff0daa2d959fb4dfe450ab5f8700a901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janez=20Dem=C5=A1ar?= Date: Fri, 13 Feb 2026 21:28:10 +0100 Subject: [PATCH] Refactor deployment workflow to use reusable action --- .github/workflows/deploy.yml | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d40426d..4b3261c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,4 +1,4 @@ -name: Deploy on master merge +name: Deploy on: push: @@ -7,25 +7,7 @@ on: branches: [master] jobs: - deploy: - runs-on: ubuntu-latest - env: - DEPLOY_SERVER: 193.2.72.46 - DEPLOY_USER: notes-deploy-user - - steps: - - name: Set up SSH key - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_NOTES_DEPLOY_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 - chmod 600 ~/.ssh/id_ed25519 - - ssh-keyscan -H $DEPLOY_SERVER >> ~/.ssh/known_hosts - - - name: Trigger deploy script over SSH - run: | - ARGS="" - if [ "${{ github.event_name }}" = "pull_request" ]; then - ARGS="${{ github.head_ref }}" - fi - ssh -o StrictHostKeyChecking=yes $DEPLOY_USER@$DEPLOY_SERVER "${{ github.repository }}" $ARGS + call-deploy: + uses: biolab/notes-deploy-ci/.github/workflows/deploy.yml@master + secrets: + SSH_KEY: ${{ secrets.SSH_NOTES_DEPLOY_PRIVATE_KEY }}