use ots ssh and rsync
Some checks failed
Build Hugo Site / build (push) Failing after 1m9s

This commit is contained in:
John 2025-03-09 09:37:53 -05:00
parent 79c2459d44
commit 2f20584010

View File

@ -24,14 +24,12 @@ jobs:
- name: Build Site
run: hugo --minify
- name: Setup SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
# Use your host machine's IP instead of localhost
ssh-keyscan -H 172.17.0.1 >> ~/.ssh/known_hosts
- name: Copy Files to App Server
run: |
rsync -avz --delete public/ john@172.17.0.1:/home/john/mine/scripts/hugo/public/
- name: Deploy to Server
uses: appleboy/scp-action@v0.1.7
with:
host: "172.17.0.1"
username: "john"
key: ${{ secrets.SSH_PRIVATE_KEY }}
source: "public/*"
target: "/home/john/mine/scripts/hugo/"
strip_components: 1