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 }}