File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy on master merge
2+
3+ on :
4+ push :
5+ branches : [master]
6+ pull_request :
7+ branches : [master]
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+ run : |
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
You can’t perform that action at this time.
0 commit comments