John e9a05870d6
Some checks failed
Build Hugo Site / build (push) Failing after 23s
switch to rsync
2025-03-09 09:31:17 -05:00

37 lines
849 B
YAML

name: Build Hugo Site
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true
- name: Install Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- 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
# Add localhost to known hosts to avoid prompt
ssh-keyscan -H localhost >> ~/.ssh/known_hosts
- name: Copy Files to App Server
run: |
rsync -avz --delete public/ john@localhost:/home/john/mine/scripts/hugo/public/