-
Notifications
You must be signed in to change notification settings - Fork 1
executable file
·28 lines (22 loc) · 958 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
name: Pull on GitHub Repo Update
on:
push:
branches:
- public # Triggers on push to the 'public' branch
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Deploy to Server via SSH
uses: appleboy/[email protected]
with:
host: ${{ secrets.SERVER_HOST }} # Your server's IP address or hostname
username: ${{ secrets.SSH_USER }} # SSH username for the server
key: ${{ secrets.SSH_KEY }} # SSH private key (added as GitHub secret)
script: |
cd /notes/Obsidian-Notes-Public # Replace with your project directory on the server
git pull public public # Pull updates from 'public' branch on 'public' remote
cp -r notes/Obsidian-Notes-Public/Publish/Attachments/* notes/digital-garden/public/images/
cp -r notes/Obsidian-Notes-Public/Publish/* notes/digital-garden/posts/