We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ca3934 commit 85ed50dCopy full SHA for 85ed50d
1 file changed
.github/workflows/deploy.yml
@@ -0,0 +1,31 @@
1
+name: Deploy on master merge
2
+
3
+on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
8
9
+jobs:
10
+ deploy:
11
+ runs-on: ubuntu-latest
12
+ env:
13
+ DEPLOY_SERVER: 193.2.72.46
14
+ DEPLOY_USER: notes-deploy-user
15
16
+ steps:
17
+ - name: Set up SSH key
18
+ run: |
19
+ mkdir -p ~/.ssh
20
+ echo "${{ secrets.SSH_NOTES_DEPLOY_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
21
+ chmod 600 ~/.ssh/id_ed25519
22
23
+ ssh-keyscan -H $DEPLOY_SERVER >> ~/.ssh/known_hosts
24
25
+ - name: Trigger deploy script over SSH
26
27
+ ARGS=""
28
+ if [ "${{ github.event_name }}" = "pull_request" ]; then
29
+ ARGS="${{ github.head_ref }}"
30
+ fi
31
+ ssh -o StrictHostKeyChecking=yes $DEPLOY_USER@$DEPLOY_SERVER "${{ github.repository }}" $ARGS
0 commit comments