Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 5 additions & 23 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy on master merge
name: Deploy

on:
push:
Expand All @@ -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 }}